{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 高德地图API\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 地理编码\n",
    ">3.1 [地理编码](https://lbs.amap.com/api/webservice/guide/api/georegeo)\n",
    ">>3.1.1结构化地址含义：首先，地址肯定是一串字符，内含国家、省份、城市、区县、城镇、乡村、街道、门牌号码、屋邨、大厦等建筑物名称。按照由大区域名称到小区域名称组合在一起的字符。一个有效的地址应该是独一无二的。注意：针对大陆、港、澳地区的地理编码转换时可以将国家信息选择性的忽略，但省、市、城镇等级别的地址构成是不能忽略的。暂时不支持返回台湾省的详细地址信息。\n",
    "\n",
    ">>3.1.2url:https://restapi.amap.com/v3/geocode/geo?parameters\n",
    "\n",
    ">>3.2.3request.get\n",
    "\n",
    ">>3.2.4参数：key,address"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "#准备工作\n",
    "import requests,json\n",
    "import pandas as pd\n",
    "zhang_key = \"241cb34c3ba21b934c74a65177c504ec\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "# A-1\n",
    "address = \"广东省广州市中山大学南方学院\"\n",
    "geocode_url = \"https://restapi.amap.com/v3/geocode/geo?parameters\"\n",
    "params = {\n",
    "    \"key\":zhang_key,\n",
    "    \"address\":address\n",
    "}\n",
    "response = requests.get(url=geocode_url,params=params)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Response [200]>"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "response"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'count': '1',\n",
       " 'geocodes': [{'formatted_address': '广东省广州市从化区中山大学南方学院',\n",
       "   'country': '中国',\n",
       "   'province': '广东省',\n",
       "   'citycode': '020',\n",
       "   'city': '广州市',\n",
       "   'district': '从化区',\n",
       "   'township': [],\n",
       "   'neighborhood': {'name': [], 'type': []},\n",
       "   'building': {'name': [], 'type': []},\n",
       "   'adcode': '440117',\n",
       "   'street': [],\n",
       "   'number': [],\n",
       "   'location': '113.679287,23.632575',\n",
       "   'level': '兴趣点'}]}"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "response.json()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'113.679287,23.632575'"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "中大南方_location = response.json()['geocodes'][0]['location']\n",
    "中大南方_location"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 逆地理编码\n",
    "* 1.url:https://restapi.amap.com/v3/geocode/regeo?parameters"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "def regeo(key,location,extensions=\"base\",poitype=None,radius=None,roadlevel=None):\n",
    "    \"\"\"高德API逆地理编码获取\"\"\"\n",
    "    regeo_url = \"https://restapi.amap.com/v3/geocode/regeo?parameters\"\n",
    "    params_regeo ={\n",
    "        \"key\":zhang_key,\n",
    "        \"location\":location,\n",
    "        \"extensions\":extensions,\n",
    "        \"poitype\":poitype,\n",
    "        \"radius\":radius,\n",
    "        \"roadlevel\":roadlevel\n",
    "    }\n",
    "    r=requests.get(url=regeo_url,params=params_regeo)\n",
    "    return r.json()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'regeocode': {'addressComponent': {'city': '广州市',\n",
       "   'province': '广东省',\n",
       "   'adcode': '440117',\n",
       "   'district': '从化区',\n",
       "   'towncode': '440117103000',\n",
       "   'streetNumber': {'number': '7号',\n",
       "    'location': '113.678600,23.633329',\n",
       "    'direction': '西北',\n",
       "    'distance': '109.203',\n",
       "    'street': '博学路'},\n",
       "   'country': '中国',\n",
       "   'township': '温泉镇',\n",
       "   'businessAreas': [{'location': '113.648930,23.636205',\n",
       "     'name': '温泉',\n",
       "     'id': '440117'}],\n",
       "   'building': {'name': [], 'type': []},\n",
       "   'neighborhood': {'name': [], 'type': []},\n",
       "   'citycode': '020'},\n",
       "  'formatted_address': '广东省广州市从化区温泉镇中山大学南方学院'},\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000'}"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "regeo(key=zhang_key,location=中大南方_location,radius=3000)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "regeo_url = \"https://restapi.amap.com/v3/geocode/regeo?parameters\"\n",
    "params_regeo ={\n",
    "    \"key\":zhang_key,\n",
    "    \"location\":中大南方_location,\n",
    "    \"extensions\":\"all\"\n",
    "}\n",
    "r=requests.get(url=regeo_url,params=params_regeo)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Response [200]>"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'regeocode': {'roads': [{'id': '020F49F0050461203',\n",
       "    'location': '113.68,23.634',\n",
       "    'direction': '南',\n",
       "    'name': '博学路',\n",
       "    'distance': '156.951'},\n",
       "   {'id': '020F49F0050462451',\n",
       "    'location': '113.677,23.6347',\n",
       "    'direction': '东南',\n",
       "    'name': '中山路',\n",
       "    'distance': '343.951'},\n",
       "   {'id': '020F49F006047765',\n",
       "    'location': '113.682,23.6394',\n",
       "    'direction': '南',\n",
       "    'name': 'S29从莞深高速',\n",
       "    'distance': '807.947'}],\n",
       "  'roadinters': [{'second_name': '中山路',\n",
       "    'first_id': '020F49F0050461203',\n",
       "    'second_id': '020F49F0050462451',\n",
       "    'location': '113.676794,23.634661',\n",
       "    'distance': '343.951',\n",
       "    'first_name': '博学路',\n",
       "    'direction': '东南'}],\n",
       "  'formatted_address': '广东省广州市从化区温泉镇中山大学南方学院',\n",
       "  'addressComponent': {'city': '广州市',\n",
       "   'province': '广东省',\n",
       "   'adcode': '440117',\n",
       "   'district': '从化区',\n",
       "   'towncode': '440117103000',\n",
       "   'streetNumber': {'number': '7号',\n",
       "    'location': '113.678600,23.633329',\n",
       "    'direction': '西北',\n",
       "    'distance': '109.203',\n",
       "    'street': '博学路'},\n",
       "   'country': '中国',\n",
       "   'township': '温泉镇',\n",
       "   'businessAreas': [[]],\n",
       "   'building': {'name': [], 'type': []},\n",
       "   'neighborhood': {'name': [], 'type': []},\n",
       "   'citycode': '020'},\n",
       "  'aois': [{'area': '536585.849985',\n",
       "    'type': '141201',\n",
       "    'id': 'B00140MR9A',\n",
       "    'location': '113.679262,23.632583',\n",
       "    'adcode': '440117',\n",
       "    'name': '中山大学南方学院',\n",
       "    'distance': '0'}],\n",
       "  'pois': [{'id': 'B00140MR9A',\n",
       "    'direction': '西',\n",
       "    'businessarea': [],\n",
       "    'address': '温泉大道882号',\n",
       "    'poiweight': '0.450402',\n",
       "    'name': '中山大学南方学院',\n",
       "    'location': '113.679262,23.632583',\n",
       "    'distance': '2.69979',\n",
       "    'tel': '020-61787331',\n",
       "    'type': '科教文化服务;学校;高等院校'},\n",
       "   {'id': 'B0FFF2VMJ4',\n",
       "    'direction': '东南',\n",
       "    'businessarea': [],\n",
       "    'address': '温泉大道886号中山大学南方学院内',\n",
       "    'poiweight': '0.148531',\n",
       "    'name': '中山大学南方学院-综合楼',\n",
       "    'location': '113.680117,23.631544',\n",
       "    'distance': '142.466',\n",
       "    'tel': [],\n",
       "    'type': '科教文化服务;学校;学校'},\n",
       "   {'id': 'B0FFFTC9PH',\n",
       "    'direction': '东北',\n",
       "    'businessarea': [],\n",
       "    'address': '从莞深高速(中山大学南方学院)',\n",
       "    'poiweight': '0.193172',\n",
       "    'name': '中山大学南方学院教学楼10号',\n",
       "    'location': '113.680125,23.633492',\n",
       "    'distance': '132.988',\n",
       "    'tel': [],\n",
       "    'type': '科教文化服务;科教文化场所;科教文化场所'},\n",
       "   {'id': 'B00141TQKX',\n",
       "    'direction': '西北',\n",
       "    'businessarea': [],\n",
       "    'address': '温泉大道882',\n",
       "    'poiweight': '0.148531',\n",
       "    'name': '中山大学南方学院教学楼6号',\n",
       "    'location': '113.678424,23.633710',\n",
       "    'distance': '153.818',\n",
       "    'tel': [],\n",
       "    'type': '科教文化服务;学校;学校'},\n",
       "   {'id': 'B00141TQGR',\n",
       "    'direction': '西北',\n",
       "    'businessarea': [],\n",
       "    'address': '博学路7',\n",
       "    'poiweight': '0.148531',\n",
       "    'name': '中山大学南方学院教学楼7号',\n",
       "    'location': '113.678600,23.633330',\n",
       "    'distance': '109.298',\n",
       "    'tel': [],\n",
       "    'type': '科教文化服务;学校;高等院校'},\n",
       "   {'id': 'B00141WQCO',\n",
       "    'direction': '东北',\n",
       "    'businessarea': [],\n",
       "    'address': '博学路',\n",
       "    'poiweight': '0.14954',\n",
       "    'name': '中山大学南方学院教学楼8号',\n",
       "    'location': '113.680399,23.634329',\n",
       "    'distance': '225.543',\n",
       "    'tel': [],\n",
       "    'type': '科教文化服务;科教文化场所;科教文化场所'},\n",
       "   {'id': 'B0FFG9IORM',\n",
       "    'direction': '西北',\n",
       "    'businessarea': [],\n",
       "    'address': '温泉大道882号中山大学南方学院内',\n",
       "    'poiweight': '0.287887',\n",
       "    'name': '中山大学南方学院-图书馆',\n",
       "    'location': '113.679177,23.632762',\n",
       "    'distance': '23.6163',\n",
       "    'tel': '020-61787368;020-61787371',\n",
       "    'type': '科教文化服务;图书馆;图书馆'},\n",
       "   {'id': 'B0FFKP9EQJ',\n",
       "    'direction': '东',\n",
       "    'businessarea': [],\n",
       "    'address': '博学路附近',\n",
       "    'poiweight': '0.191742',\n",
       "    'name': '中山大学南方学院4号实验楼',\n",
       "    'location': '113.679963,23.632652',\n",
       "    'distance': '69.4077',\n",
       "    'tel': [],\n",
       "    'type': '科教文化服务;科教文化场所;科教文化场所'},\n",
       "   {'id': 'B0FFJKIA10',\n",
       "    'direction': '东北',\n",
       "    'businessarea': [],\n",
       "    'address': '温泉大道882号中山大学南方学院',\n",
       "    'poiweight': '0.191691',\n",
       "    'name': '中山大学南方学院-第11教学楼',\n",
       "    'location': '113.680037,23.633173',\n",
       "    'distance': '101.294',\n",
       "    'tel': [],\n",
       "    'type': '科教文化服务;科教文化场所;科教文化场所'},\n",
       "   {'id': 'B00141TRVH',\n",
       "    'direction': '西南',\n",
       "    'businessarea': [],\n",
       "    'address': '博学路21',\n",
       "    'poiweight': '0.148531',\n",
       "    'name': '中山大学南方学院教学楼2号',\n",
       "    'location': '113.677060,23.631346',\n",
       "    'distance': '264.846',\n",
       "    'tel': [],\n",
       "    'type': '科教文化服务;科教文化场所;科教文化场所'},\n",
       "   {'id': 'B0FFKERBQZ',\n",
       "    'direction': '西北',\n",
       "    'businessarea': [],\n",
       "    'address': '博学路7号附近',\n",
       "    'poiweight': '0.289141',\n",
       "    'name': '中山大学南方学院惟贤门',\n",
       "    'location': '113.678437,23.633721',\n",
       "    'distance': '154.082',\n",
       "    'tel': [],\n",
       "    'type': '科教文化服务;学校;高等院校'},\n",
       "   {'id': 'B0FFKP81F4',\n",
       "    'direction': '东北',\n",
       "    'businessarea': [],\n",
       "    'address': '中山路',\n",
       "    'poiweight': '0.191742',\n",
       "    'name': '政商研究院教学楼9号',\n",
       "    'location': '113.679949,23.633919',\n",
       "    'distance': '163.951',\n",
       "    'tel': [],\n",
       "    'type': '科教文化服务;科教文化场所;科教文化场所'},\n",
       "   {'id': 'B0FFKP9ET5',\n",
       "    'direction': '西南',\n",
       "    'businessarea': [],\n",
       "    'address': '博学路附近',\n",
       "    'poiweight': '0.191742',\n",
       "    'name': '中山大学南方学院1号实验楼',\n",
       "    'location': '113.678215,23.631370',\n",
       "    'distance': '172.86',\n",
       "    'tel': [],\n",
       "    'type': '科教文化服务;科教文化场所;科教文化场所'},\n",
       "   {'id': 'B00141TR76',\n",
       "    'direction': '西南',\n",
       "    'businessarea': [],\n",
       "    'address': '博学路29',\n",
       "    'poiweight': '0.052819',\n",
       "    'name': '中山大学南方学院教学楼4号',\n",
       "    'location': '113.677460,23.630490',\n",
       "    'distance': '297.315',\n",
       "    'tel': [],\n",
       "    'type': '科教文化服务;科教文化场所;科教文化场所'},\n",
       "   {'id': 'B0FFKP7Q5N',\n",
       "    'direction': '西南',\n",
       "    'businessarea': [],\n",
       "    'address': '博学路',\n",
       "    'poiweight': '0.191742',\n",
       "    'name': '中山大学南方学院2号实验楼',\n",
       "    'location': '113.678211,23.630956',\n",
       "    'distance': '210.76',\n",
       "    'tel': [],\n",
       "    'type': '科教文化服务;科教文化场所;科教文化场所'},\n",
       "   {'id': 'B00140TWHT',\n",
       "    'direction': '南',\n",
       "    'businessarea': [],\n",
       "    'address': '笃行路2号',\n",
       "    'poiweight': '0.157653',\n",
       "    'name': '教工住宅1号',\n",
       "    'location': '113.678490,23.630432',\n",
       "    'distance': '251.758',\n",
       "    'tel': [],\n",
       "    'type': '商务住宅;住宅区;住宅小区'},\n",
       "   {'id': 'B0G3ARGF5Y',\n",
       "    'direction': '西',\n",
       "    'businessarea': [],\n",
       "    'address': [],\n",
       "    'poiweight': '0.286321',\n",
       "    'name': '中山大学南方学院教学楼1号',\n",
       "    'location': '113.677077,23.631783',\n",
       "    'distance': '241.753',\n",
       "    'tel': [],\n",
       "    'type': '科教文化服务;学校;高等院校'},\n",
       "   {'id': 'B0FFLBEOND',\n",
       "    'direction': '东南',\n",
       "    'businessarea': [],\n",
       "    'address': '从莞深高速(中山大学南方学院)',\n",
       "    'poiweight': '0.190963',\n",
       "    'name': '聚贤楼10号',\n",
       "    'location': '113.681253,23.631036',\n",
       "    'distance': '263.444',\n",
       "    'tel': [],\n",
       "    'type': '商务住宅;住宅区;宿舍'},\n",
       "   {'id': 'B0FFKP81F0',\n",
       "    'direction': '西',\n",
       "    'businessarea': [],\n",
       "    'address': '博学路19号附近',\n",
       "    'poiweight': '0.191742',\n",
       "    'name': '教学楼1号(文学与传媒学院)',\n",
       "    'location': '113.676866,23.631736',\n",
       "    'distance': '263.674',\n",
       "    'tel': [],\n",
       "    'type': '科教文化服务;科教文化场所;科教文化场所'},\n",
       "   {'id': 'B0FFKP838K',\n",
       "    'direction': '西南',\n",
       "    'businessarea': [],\n",
       "    'address': '博学路25',\n",
       "    'poiweight': '0.191742',\n",
       "    'name': '教学楼3号(外国语学院)',\n",
       "    'location': '113.677247,23.630947',\n",
       "    'distance': '275.62',\n",
       "    'tel': [],\n",
       "    'type': '科教文化服务;科教文化场所;科教文化场所'},\n",
       "   {'id': 'B0FFJLW0O9',\n",
       "    'direction': '西',\n",
       "    'businessarea': [],\n",
       "    'address': '博学路4附近',\n",
       "    'poiweight': '0.191645',\n",
       "    'name': '中山大学南方学院西区饭堂',\n",
       "    'location': '113.676210,23.632177',\n",
       "    'distance': '316.572',\n",
       "    'tel': [],\n",
       "    'type': '科教文化服务;科教文化场所;科教文化场所'},\n",
       "   {'id': 'B0FFKPXMCN',\n",
       "    'direction': '北',\n",
       "    'businessarea': [],\n",
       "    'address': '中山路',\n",
       "    'poiweight': '0.191739',\n",
       "    'name': '中山大学南方学院音乐系',\n",
       "    'location': '113.678792,23.635389',\n",
       "    'distance': '316.942',\n",
       "    'tel': [],\n",
       "    'type': '科教文化服务;科教文化场所;科教文化场所'},\n",
       "   {'id': 'B0FFJBZLYT',\n",
       "    'direction': '西北',\n",
       "    'businessarea': [],\n",
       "    'address': '中山路与博学路交叉口东南50米',\n",
       "    'poiweight': '0.297382',\n",
       "    'name': '铜像广场',\n",
       "    'location': '113.676921,23.634555',\n",
       "    'distance': '326.444',\n",
       "    'tel': [],\n",
       "    'type': '风景名胜;风景名胜;风景名胜'},\n",
       "   {'id': 'B0FFG8CSEK',\n",
       "    'direction': '东',\n",
       "    'businessarea': [],\n",
       "    'address': '从莞深高速(中山大学南方学院)',\n",
       "    'poiweight': '0.185371',\n",
       "    'name': 'L5员工宿舍',\n",
       "    'location': '113.682583,23.631487',\n",
       "    'distance': '356.923',\n",
       "    'tel': [],\n",
       "    'type': '商务住宅;住宅区;宿舍'},\n",
       "   {'id': 'B0FFKPXO2S',\n",
       "    'direction': '北',\n",
       "    'businessarea': [],\n",
       "    'address': '博学路附近',\n",
       "    'poiweight': '0.188247',\n",
       "    'name': '中山大学南方学院医务室',\n",
       "    'location': '113.679394,23.635924',\n",
       "    'distance': '372.556',\n",
       "    'tel': [],\n",
       "    'type': '医疗保健服务;医疗保健服务场所;医疗保健服务场所'},\n",
       "   {'id': 'B0FFH6K3U9',\n",
       "    'direction': '西南',\n",
       "    'businessarea': [],\n",
       "    'address': '温泉镇温泉大道882号中大南方H7栋1-5层',\n",
       "    'poiweight': '0.254885',\n",
       "    'name': '广州中大南方招待所',\n",
       "    'location': '113.676330,23.631332',\n",
       "    'distance': '331.438',\n",
       "    'tel': '020-61787222',\n",
       "    'type': '住宿服务;住宿服务相关;住宿服务相关'},\n",
       "   {'id': 'B0FFHHLMF8',\n",
       "    'direction': '东北',\n",
       "    'businessarea': [],\n",
       "    'address': '中山大学南方学院明辩路2号第三饭堂',\n",
       "    'poiweight': '0.178935',\n",
       "    'name': '茗语轩餐厅',\n",
       "    'location': '113.681901,23.634495',\n",
       "    'distance': '341.332',\n",
       "    'tel': '13929501395;13533390928',\n",
       "    'type': '餐饮服务;中餐厅;中餐厅'},\n",
       "   {'id': 'B0FFLJV996',\n",
       "    'direction': '东南',\n",
       "    'businessarea': [],\n",
       "    'address': [],\n",
       "    'poiweight': '0.286264',\n",
       "    'name': '保利桃花源66BLOCK',\n",
       "    'location': '113.682954,23.631008',\n",
       "    'distance': '412.208',\n",
       "    'tel': [],\n",
       "    'type': '商务住宅;住宅区;住宅小区'},\n",
       "   {'id': 'B0FFKPXY26',\n",
       "    'direction': '北',\n",
       "    'businessarea': [],\n",
       "    'address': '从莞深高速公路',\n",
       "    'poiweight': '0.21826',\n",
       "    'name': '中山大学南方学院聚贤楼5号',\n",
       "    'location': '113.680265,23.636313',\n",
       "    'distance': '427.447',\n",
       "    'tel': [],\n",
       "    'type': '商务住宅;商务住宅相关;商务住宅相关'},\n",
       "   {'id': 'B0FFGXGN3K',\n",
       "    'direction': '东',\n",
       "    'businessarea': [],\n",
       "    'address': '中山大学南方学院',\n",
       "    'poiweight': '0.188657',\n",
       "    'name': '中山大学南方学院宿舍H25',\n",
       "    'location': '113.683474,23.632020',\n",
       "    'distance': '430.984',\n",
       "    'tel': [],\n",
       "    'type': '商务住宅;住宅区;宿舍'}]},\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000'}"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "results=r.json()\n",
    "results"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>location</th>\n",
       "      <th>direction</th>\n",
       "      <th>name</th>\n",
       "      <th>distance</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>020F49F0050461203</td>\n",
       "      <td>113.68,23.634</td>\n",
       "      <td>南</td>\n",
       "      <td>博学路</td>\n",
       "      <td>156.951</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>020F49F0050462451</td>\n",
       "      <td>113.677,23.6347</td>\n",
       "      <td>东南</td>\n",
       "      <td>中山路</td>\n",
       "      <td>343.951</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>020F49F006047765</td>\n",
       "      <td>113.682,23.6394</td>\n",
       "      <td>南</td>\n",
       "      <td>S29从莞深高速</td>\n",
       "      <td>807.947</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                  id         location direction      name distance\n",
       "0  020F49F0050461203    113.68,23.634         南       博学路  156.951\n",
       "1  020F49F0050462451  113.677,23.6347        东南       中山路  343.951\n",
       "2   020F49F006047765  113.682,23.6394         南  S29从莞深高速  807.947"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 显示道路信息\n",
    "pd.json_normalize(results['regeocode']['roads'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>direction</th>\n",
       "      <th>businessarea</th>\n",
       "      <th>address</th>\n",
       "      <th>poiweight</th>\n",
       "      <th>name</th>\n",
       "      <th>location</th>\n",
       "      <th>distance</th>\n",
       "      <th>tel</th>\n",
       "      <th>type</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>B00140MR9A</td>\n",
       "      <td>西</td>\n",
       "      <td>[]</td>\n",
       "      <td>温泉大道882号</td>\n",
       "      <td>0.450402</td>\n",
       "      <td>中山大学南方学院</td>\n",
       "      <td>113.679262,23.632583</td>\n",
       "      <td>2.69979</td>\n",
       "      <td>020-61787331</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>B0FFF2VMJ4</td>\n",
       "      <td>东南</td>\n",
       "      <td>[]</td>\n",
       "      <td>温泉大道886号中山大学南方学院内</td>\n",
       "      <td>0.148531</td>\n",
       "      <td>中山大学南方学院-综合楼</td>\n",
       "      <td>113.680117,23.631544</td>\n",
       "      <td>142.466</td>\n",
       "      <td>[]</td>\n",
       "      <td>科教文化服务;学校;学校</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>B0FFFTC9PH</td>\n",
       "      <td>东北</td>\n",
       "      <td>[]</td>\n",
       "      <td>从莞深高速(中山大学南方学院)</td>\n",
       "      <td>0.193172</td>\n",
       "      <td>中山大学南方学院教学楼10号</td>\n",
       "      <td>113.680125,23.633492</td>\n",
       "      <td>132.988</td>\n",
       "      <td>[]</td>\n",
       "      <td>科教文化服务;科教文化场所;科教文化场所</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>B00141TQKX</td>\n",
       "      <td>西北</td>\n",
       "      <td>[]</td>\n",
       "      <td>温泉大道882</td>\n",
       "      <td>0.148531</td>\n",
       "      <td>中山大学南方学院教学楼6号</td>\n",
       "      <td>113.678424,23.633710</td>\n",
       "      <td>153.818</td>\n",
       "      <td>[]</td>\n",
       "      <td>科教文化服务;学校;学校</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>B00141TQGR</td>\n",
       "      <td>西北</td>\n",
       "      <td>[]</td>\n",
       "      <td>博学路7</td>\n",
       "      <td>0.148531</td>\n",
       "      <td>中山大学南方学院教学楼7号</td>\n",
       "      <td>113.678600,23.633330</td>\n",
       "      <td>109.298</td>\n",
       "      <td>[]</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>B00141WQCO</td>\n",
       "      <td>东北</td>\n",
       "      <td>[]</td>\n",
       "      <td>博学路</td>\n",
       "      <td>0.14954</td>\n",
       "      <td>中山大学南方学院教学楼8号</td>\n",
       "      <td>113.680399,23.634329</td>\n",
       "      <td>225.543</td>\n",
       "      <td>[]</td>\n",
       "      <td>科教文化服务;科教文化场所;科教文化场所</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>B0FFG9IORM</td>\n",
       "      <td>西北</td>\n",
       "      <td>[]</td>\n",
       "      <td>温泉大道882号中山大学南方学院内</td>\n",
       "      <td>0.287887</td>\n",
       "      <td>中山大学南方学院-图书馆</td>\n",
       "      <td>113.679177,23.632762</td>\n",
       "      <td>23.6163</td>\n",
       "      <td>020-61787368;020-61787371</td>\n",
       "      <td>科教文化服务;图书馆;图书馆</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>B0FFKP9EQJ</td>\n",
       "      <td>东</td>\n",
       "      <td>[]</td>\n",
       "      <td>博学路附近</td>\n",
       "      <td>0.191742</td>\n",
       "      <td>中山大学南方学院4号实验楼</td>\n",
       "      <td>113.679963,23.632652</td>\n",
       "      <td>69.4077</td>\n",
       "      <td>[]</td>\n",
       "      <td>科教文化服务;科教文化场所;科教文化场所</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>B0FFJKIA10</td>\n",
       "      <td>东北</td>\n",
       "      <td>[]</td>\n",
       "      <td>温泉大道882号中山大学南方学院</td>\n",
       "      <td>0.191691</td>\n",
       "      <td>中山大学南方学院-第11教学楼</td>\n",
       "      <td>113.680037,23.633173</td>\n",
       "      <td>101.294</td>\n",
       "      <td>[]</td>\n",
       "      <td>科教文化服务;科教文化场所;科教文化场所</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>B00141TRVH</td>\n",
       "      <td>西南</td>\n",
       "      <td>[]</td>\n",
       "      <td>博学路21</td>\n",
       "      <td>0.148531</td>\n",
       "      <td>中山大学南方学院教学楼2号</td>\n",
       "      <td>113.677060,23.631346</td>\n",
       "      <td>264.846</td>\n",
       "      <td>[]</td>\n",
       "      <td>科教文化服务;科教文化场所;科教文化场所</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>B0FFKERBQZ</td>\n",
       "      <td>西北</td>\n",
       "      <td>[]</td>\n",
       "      <td>博学路7号附近</td>\n",
       "      <td>0.289141</td>\n",
       "      <td>中山大学南方学院惟贤门</td>\n",
       "      <td>113.678437,23.633721</td>\n",
       "      <td>154.082</td>\n",
       "      <td>[]</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>B0FFKP81F4</td>\n",
       "      <td>东北</td>\n",
       "      <td>[]</td>\n",
       "      <td>中山路</td>\n",
       "      <td>0.191742</td>\n",
       "      <td>政商研究院教学楼9号</td>\n",
       "      <td>113.679949,23.633919</td>\n",
       "      <td>163.951</td>\n",
       "      <td>[]</td>\n",
       "      <td>科教文化服务;科教文化场所;科教文化场所</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>B0FFKP9ET5</td>\n",
       "      <td>西南</td>\n",
       "      <td>[]</td>\n",
       "      <td>博学路附近</td>\n",
       "      <td>0.191742</td>\n",
       "      <td>中山大学南方学院1号实验楼</td>\n",
       "      <td>113.678215,23.631370</td>\n",
       "      <td>172.86</td>\n",
       "      <td>[]</td>\n",
       "      <td>科教文化服务;科教文化场所;科教文化场所</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>B00141TR76</td>\n",
       "      <td>西南</td>\n",
       "      <td>[]</td>\n",
       "      <td>博学路29</td>\n",
       "      <td>0.052819</td>\n",
       "      <td>中山大学南方学院教学楼4号</td>\n",
       "      <td>113.677460,23.630490</td>\n",
       "      <td>297.315</td>\n",
       "      <td>[]</td>\n",
       "      <td>科教文化服务;科教文化场所;科教文化场所</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>B0FFKP7Q5N</td>\n",
       "      <td>西南</td>\n",
       "      <td>[]</td>\n",
       "      <td>博学路</td>\n",
       "      <td>0.191742</td>\n",
       "      <td>中山大学南方学院2号实验楼</td>\n",
       "      <td>113.678211,23.630956</td>\n",
       "      <td>210.76</td>\n",
       "      <td>[]</td>\n",
       "      <td>科教文化服务;科教文化场所;科教文化场所</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>B00140TWHT</td>\n",
       "      <td>南</td>\n",
       "      <td>[]</td>\n",
       "      <td>笃行路2号</td>\n",
       "      <td>0.157653</td>\n",
       "      <td>教工住宅1号</td>\n",
       "      <td>113.678490,23.630432</td>\n",
       "      <td>251.758</td>\n",
       "      <td>[]</td>\n",
       "      <td>商务住宅;住宅区;住宅小区</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>B0G3ARGF5Y</td>\n",
       "      <td>西</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0.286321</td>\n",
       "      <td>中山大学南方学院教学楼1号</td>\n",
       "      <td>113.677077,23.631783</td>\n",
       "      <td>241.753</td>\n",
       "      <td>[]</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>B0FFLBEOND</td>\n",
       "      <td>东南</td>\n",
       "      <td>[]</td>\n",
       "      <td>从莞深高速(中山大学南方学院)</td>\n",
       "      <td>0.190963</td>\n",
       "      <td>聚贤楼10号</td>\n",
       "      <td>113.681253,23.631036</td>\n",
       "      <td>263.444</td>\n",
       "      <td>[]</td>\n",
       "      <td>商务住宅;住宅区;宿舍</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>B0FFKP81F0</td>\n",
       "      <td>西</td>\n",
       "      <td>[]</td>\n",
       "      <td>博学路19号附近</td>\n",
       "      <td>0.191742</td>\n",
       "      <td>教学楼1号(文学与传媒学院)</td>\n",
       "      <td>113.676866,23.631736</td>\n",
       "      <td>263.674</td>\n",
       "      <td>[]</td>\n",
       "      <td>科教文化服务;科教文化场所;科教文化场所</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>B0FFKP838K</td>\n",
       "      <td>西南</td>\n",
       "      <td>[]</td>\n",
       "      <td>博学路25</td>\n",
       "      <td>0.191742</td>\n",
       "      <td>教学楼3号(外国语学院)</td>\n",
       "      <td>113.677247,23.630947</td>\n",
       "      <td>275.62</td>\n",
       "      <td>[]</td>\n",
       "      <td>科教文化服务;科教文化场所;科教文化场所</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>B0FFJLW0O9</td>\n",
       "      <td>西</td>\n",
       "      <td>[]</td>\n",
       "      <td>博学路4附近</td>\n",
       "      <td>0.191645</td>\n",
       "      <td>中山大学南方学院西区饭堂</td>\n",
       "      <td>113.676210,23.632177</td>\n",
       "      <td>316.572</td>\n",
       "      <td>[]</td>\n",
       "      <td>科教文化服务;科教文化场所;科教文化场所</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>B0FFKPXMCN</td>\n",
       "      <td>北</td>\n",
       "      <td>[]</td>\n",
       "      <td>中山路</td>\n",
       "      <td>0.191739</td>\n",
       "      <td>中山大学南方学院音乐系</td>\n",
       "      <td>113.678792,23.635389</td>\n",
       "      <td>316.942</td>\n",
       "      <td>[]</td>\n",
       "      <td>科教文化服务;科教文化场所;科教文化场所</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>B0FFJBZLYT</td>\n",
       "      <td>西北</td>\n",
       "      <td>[]</td>\n",
       "      <td>中山路与博学路交叉口东南50米</td>\n",
       "      <td>0.297382</td>\n",
       "      <td>铜像广场</td>\n",
       "      <td>113.676921,23.634555</td>\n",
       "      <td>326.444</td>\n",
       "      <td>[]</td>\n",
       "      <td>风景名胜;风景名胜;风景名胜</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>B0FFG8CSEK</td>\n",
       "      <td>东</td>\n",
       "      <td>[]</td>\n",
       "      <td>从莞深高速(中山大学南方学院)</td>\n",
       "      <td>0.185371</td>\n",
       "      <td>L5员工宿舍</td>\n",
       "      <td>113.682583,23.631487</td>\n",
       "      <td>356.923</td>\n",
       "      <td>[]</td>\n",
       "      <td>商务住宅;住宅区;宿舍</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>B0FFKPXO2S</td>\n",
       "      <td>北</td>\n",
       "      <td>[]</td>\n",
       "      <td>博学路附近</td>\n",
       "      <td>0.188247</td>\n",
       "      <td>中山大学南方学院医务室</td>\n",
       "      <td>113.679394,23.635924</td>\n",
       "      <td>372.556</td>\n",
       "      <td>[]</td>\n",
       "      <td>医疗保健服务;医疗保健服务场所;医疗保健服务场所</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>B0FFH6K3U9</td>\n",
       "      <td>西南</td>\n",
       "      <td>[]</td>\n",
       "      <td>温泉镇温泉大道882号中大南方H7栋1-5层</td>\n",
       "      <td>0.254885</td>\n",
       "      <td>广州中大南方招待所</td>\n",
       "      <td>113.676330,23.631332</td>\n",
       "      <td>331.438</td>\n",
       "      <td>020-61787222</td>\n",
       "      <td>住宿服务;住宿服务相关;住宿服务相关</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>B0FFHHLMF8</td>\n",
       "      <td>东北</td>\n",
       "      <td>[]</td>\n",
       "      <td>中山大学南方学院明辩路2号第三饭堂</td>\n",
       "      <td>0.178935</td>\n",
       "      <td>茗语轩餐厅</td>\n",
       "      <td>113.681901,23.634495</td>\n",
       "      <td>341.332</td>\n",
       "      <td>13929501395;13533390928</td>\n",
       "      <td>餐饮服务;中餐厅;中餐厅</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>B0FFLJV996</td>\n",
       "      <td>东南</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0.286264</td>\n",
       "      <td>保利桃花源66BLOCK</td>\n",
       "      <td>113.682954,23.631008</td>\n",
       "      <td>412.208</td>\n",
       "      <td>[]</td>\n",
       "      <td>商务住宅;住宅区;住宅小区</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>B0FFKPXY26</td>\n",
       "      <td>北</td>\n",
       "      <td>[]</td>\n",
       "      <td>从莞深高速公路</td>\n",
       "      <td>0.21826</td>\n",
       "      <td>中山大学南方学院聚贤楼5号</td>\n",
       "      <td>113.680265,23.636313</td>\n",
       "      <td>427.447</td>\n",
       "      <td>[]</td>\n",
       "      <td>商务住宅;商务住宅相关;商务住宅相关</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>B0FFGXGN3K</td>\n",
       "      <td>东</td>\n",
       "      <td>[]</td>\n",
       "      <td>中山大学南方学院</td>\n",
       "      <td>0.188657</td>\n",
       "      <td>中山大学南方学院宿舍H25</td>\n",
       "      <td>113.683474,23.632020</td>\n",
       "      <td>430.984</td>\n",
       "      <td>[]</td>\n",
       "      <td>商务住宅;住宅区;宿舍</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            id direction businessarea                 address poiweight  \\\n",
       "0   B00140MR9A         西           []                温泉大道882号  0.450402   \n",
       "1   B0FFF2VMJ4        东南           []       温泉大道886号中山大学南方学院内  0.148531   \n",
       "2   B0FFFTC9PH        东北           []         从莞深高速(中山大学南方学院)  0.193172   \n",
       "3   B00141TQKX        西北           []                 温泉大道882  0.148531   \n",
       "4   B00141TQGR        西北           []                    博学路7  0.148531   \n",
       "5   B00141WQCO        东北           []                     博学路   0.14954   \n",
       "6   B0FFG9IORM        西北           []       温泉大道882号中山大学南方学院内  0.287887   \n",
       "7   B0FFKP9EQJ         东           []                   博学路附近  0.191742   \n",
       "8   B0FFJKIA10        东北           []        温泉大道882号中山大学南方学院  0.191691   \n",
       "9   B00141TRVH        西南           []                   博学路21  0.148531   \n",
       "10  B0FFKERBQZ        西北           []                 博学路7号附近  0.289141   \n",
       "11  B0FFKP81F4        东北           []                     中山路  0.191742   \n",
       "12  B0FFKP9ET5        西南           []                   博学路附近  0.191742   \n",
       "13  B00141TR76        西南           []                   博学路29  0.052819   \n",
       "14  B0FFKP7Q5N        西南           []                     博学路  0.191742   \n",
       "15  B00140TWHT         南           []                   笃行路2号  0.157653   \n",
       "16  B0G3ARGF5Y         西           []                      []  0.286321   \n",
       "17  B0FFLBEOND        东南           []         从莞深高速(中山大学南方学院)  0.190963   \n",
       "18  B0FFKP81F0         西           []                博学路19号附近  0.191742   \n",
       "19  B0FFKP838K        西南           []                   博学路25  0.191742   \n",
       "20  B0FFJLW0O9         西           []                  博学路4附近  0.191645   \n",
       "21  B0FFKPXMCN         北           []                     中山路  0.191739   \n",
       "22  B0FFJBZLYT        西北           []         中山路与博学路交叉口东南50米  0.297382   \n",
       "23  B0FFG8CSEK         东           []         从莞深高速(中山大学南方学院)  0.185371   \n",
       "24  B0FFKPXO2S         北           []                   博学路附近  0.188247   \n",
       "25  B0FFH6K3U9        西南           []  温泉镇温泉大道882号中大南方H7栋1-5层  0.254885   \n",
       "26  B0FFHHLMF8        东北           []       中山大学南方学院明辩路2号第三饭堂  0.178935   \n",
       "27  B0FFLJV996        东南           []                      []  0.286264   \n",
       "28  B0FFKPXY26         北           []                 从莞深高速公路   0.21826   \n",
       "29  B0FFGXGN3K         东           []                中山大学南方学院  0.188657   \n",
       "\n",
       "               name              location distance                        tel  \\\n",
       "0          中山大学南方学院  113.679262,23.632583  2.69979               020-61787331   \n",
       "1      中山大学南方学院-综合楼  113.680117,23.631544  142.466                         []   \n",
       "2    中山大学南方学院教学楼10号  113.680125,23.633492  132.988                         []   \n",
       "3     中山大学南方学院教学楼6号  113.678424,23.633710  153.818                         []   \n",
       "4     中山大学南方学院教学楼7号  113.678600,23.633330  109.298                         []   \n",
       "5     中山大学南方学院教学楼8号  113.680399,23.634329  225.543                         []   \n",
       "6      中山大学南方学院-图书馆  113.679177,23.632762  23.6163  020-61787368;020-61787371   \n",
       "7     中山大学南方学院4号实验楼  113.679963,23.632652  69.4077                         []   \n",
       "8   中山大学南方学院-第11教学楼  113.680037,23.633173  101.294                         []   \n",
       "9     中山大学南方学院教学楼2号  113.677060,23.631346  264.846                         []   \n",
       "10      中山大学南方学院惟贤门  113.678437,23.633721  154.082                         []   \n",
       "11       政商研究院教学楼9号  113.679949,23.633919  163.951                         []   \n",
       "12    中山大学南方学院1号实验楼  113.678215,23.631370   172.86                         []   \n",
       "13    中山大学南方学院教学楼4号  113.677460,23.630490  297.315                         []   \n",
       "14    中山大学南方学院2号实验楼  113.678211,23.630956   210.76                         []   \n",
       "15           教工住宅1号  113.678490,23.630432  251.758                         []   \n",
       "16    中山大学南方学院教学楼1号  113.677077,23.631783  241.753                         []   \n",
       "17           聚贤楼10号  113.681253,23.631036  263.444                         []   \n",
       "18   教学楼1号(文学与传媒学院)  113.676866,23.631736  263.674                         []   \n",
       "19     教学楼3号(外国语学院)  113.677247,23.630947   275.62                         []   \n",
       "20     中山大学南方学院西区饭堂  113.676210,23.632177  316.572                         []   \n",
       "21      中山大学南方学院音乐系  113.678792,23.635389  316.942                         []   \n",
       "22             铜像广场  113.676921,23.634555  326.444                         []   \n",
       "23           L5员工宿舍  113.682583,23.631487  356.923                         []   \n",
       "24      中山大学南方学院医务室  113.679394,23.635924  372.556                         []   \n",
       "25        广州中大南方招待所  113.676330,23.631332  331.438               020-61787222   \n",
       "26            茗语轩餐厅  113.681901,23.634495  341.332    13929501395;13533390928   \n",
       "27     保利桃花源66BLOCK  113.682954,23.631008  412.208                         []   \n",
       "28    中山大学南方学院聚贤楼5号  113.680265,23.636313  427.447                         []   \n",
       "29    中山大学南方学院宿舍H25  113.683474,23.632020  430.984                         []   \n",
       "\n",
       "                        type  \n",
       "0             科教文化服务;学校;高等院校  \n",
       "1               科教文化服务;学校;学校  \n",
       "2       科教文化服务;科教文化场所;科教文化场所  \n",
       "3               科教文化服务;学校;学校  \n",
       "4             科教文化服务;学校;高等院校  \n",
       "5       科教文化服务;科教文化场所;科教文化场所  \n",
       "6             科教文化服务;图书馆;图书馆  \n",
       "7       科教文化服务;科教文化场所;科教文化场所  \n",
       "8       科教文化服务;科教文化场所;科教文化场所  \n",
       "9       科教文化服务;科教文化场所;科教文化场所  \n",
       "10            科教文化服务;学校;高等院校  \n",
       "11      科教文化服务;科教文化场所;科教文化场所  \n",
       "12      科教文化服务;科教文化场所;科教文化场所  \n",
       "13      科教文化服务;科教文化场所;科教文化场所  \n",
       "14      科教文化服务;科教文化场所;科教文化场所  \n",
       "15             商务住宅;住宅区;住宅小区  \n",
       "16            科教文化服务;学校;高等院校  \n",
       "17               商务住宅;住宅区;宿舍  \n",
       "18      科教文化服务;科教文化场所;科教文化场所  \n",
       "19      科教文化服务;科教文化场所;科教文化场所  \n",
       "20      科教文化服务;科教文化场所;科教文化场所  \n",
       "21      科教文化服务;科教文化场所;科教文化场所  \n",
       "22            风景名胜;风景名胜;风景名胜  \n",
       "23               商务住宅;住宅区;宿舍  \n",
       "24  医疗保健服务;医疗保健服务场所;医疗保健服务场所  \n",
       "25        住宿服务;住宿服务相关;住宿服务相关  \n",
       "26              餐饮服务;中餐厅;中餐厅  \n",
       "27             商务住宅;住宅区;住宅小区  \n",
       "28        商务住宅;商务住宅相关;商务住宅相关  \n",
       "29               商务住宅;住宅区;宿舍  "
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.json_normalize(results['regeocode']['pois'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 路径规划\n",
    ">3.2[路径规划](https://restapi.amap.com/v3/direction/walking?parameters)\n",
    ">>3.2.1产品介绍：路径规划API是一套以HTTP形式提供的步行、公交、驾车查询及行驶距离计算接口，返回JSON 或 XML格式的查询数据，用于实现路径规划功能的开发。由于道路/数据/算法的变更，很可能存在间隔一段时间后请求相同起终点的经纬度返回不同结果。\n",
    "\n",
    "* 步行url:https://restapi.amap.com/v3/direction/walking?parameters\n",
    "\n",
    "  公交url:https://restapi.amap.com/v3/direction/transit/integrated?parameters\n",
    "     \n",
    "  驾车url:https://restapi.amap.com/v3/direction/driving?parameters\n",
    "\n",
    ">>3.2.3request.get\n",
    "\n",
    ">>3.2.4参数：origin,destination"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 准备起始点和终点\n",
    "start_add = \"广东省广州市中山大学南方学院\"\n",
    "stop_add = \"广东省广州市龙岗\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 函数？！\n",
    "def geocode(key,address,city=None):\n",
    "    \"\"\"高德API地理编码获取\"\"\"\n",
    "    url =\"https://restapi.amap.com/v3/direction/walking?parameters\"\n",
    "    params ={\n",
    "        \"key\":key,\n",
    "        \"address\":address\n",
    "    }\n",
    "    response = requests.get(url=geocode_url,params=params)\n",
    "    results = response.json()['geocodes'][0]['location']\n",
    "    return results"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'113.679287,23.632575'"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "results_起始点 = geocode(zhang_key,start_add)\n",
    "results_起始点"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'113.583107,23.249321'"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "results_终点 = geocode(zhang_key,stop_add)\n",
    "results_终点"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 起点坐标\n",
    "address = \"广东省广州市中山大学南方学院\"\n",
    "geocode_url = \"https://restapi.amap.com/v3/geocode/geo?parameters\"\n",
    "params = {\n",
    "    \"key\":zhang_key,\n",
    "    \"address\":address\n",
    "}\n",
    "response = requests.get(url=geocode_url,params=params)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 终点坐标\n",
    "address = \"广东省广州市龙岗\"\n",
    "geocode_url = \"https://restapi.amap.com/v3/geocode/geo?parameters\"\n",
    "params = {\n",
    "    \"key\":zhang_key,\n",
    "    \"address\":address\n",
    "}\n",
    "response = requests.get(url=geocode_url,params=params)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 步行"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [],
   "source": [
    "walking_url = \"https://restapi.amap.com/v3/direction/walking?parameters\"\n",
    "params_walking = {\n",
    "    \"key\":zhang_key,\n",
    "    \"origin\":results_起始点,\n",
    "    \"destination\":results_终点\n",
    "}\n",
    "r = requests.get(url=walking_url,params=params_walking)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Response [200]>"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'ok',\n",
       " 'infocode': '10000',\n",
       " 'count': '1',\n",
       " 'route': {'origin': '113.679287,23.632575',\n",
       "  'destination': '113.583107,23.249321',\n",
       "  'paths': [{'distance': '60025',\n",
       "    'duration': '48020',\n",
       "    'steps': [{'instruction': '向东步行101米右转',\n",
       "      'orientation': '东',\n",
       "      'road': [],\n",
       "      'distance': '101',\n",
       "      'duration': '81',\n",
       "      'polyline': '113.679592,23.632491;113.680586,23.632522',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向南步行199米向右前方行走',\n",
       "      'orientation': '南',\n",
       "      'road': [],\n",
       "      'distance': '199',\n",
       "      'duration': '159',\n",
       "      'polyline': '113.680586,23.632522;113.680638,23.63214;113.680668,23.63174;113.680634,23.631541;113.68059,23.631437;113.68059,23.631437;113.680499,23.631241;113.680408,23.631094;113.680208,23.630842',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向西步行159米左转',\n",
       "      'orientation': '西',\n",
       "      'road': [],\n",
       "      'distance': '159',\n",
       "      'duration': '127',\n",
       "      'polyline': '113.680204,23.630838;113.680035,23.630773;113.680035,23.630773;113.679644,23.630638;113.679644,23.630638;113.679362,23.630521;113.679201,23.630473;113.679201,23.630473;113.679032,23.63043;113.679032,23.63043;113.67888,23.630404;113.67888,23.630404;113.678711,23.630365',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向南步行237米左转',\n",
       "      'orientation': '南',\n",
       "      'road': [],\n",
       "      'distance': '237',\n",
       "      'duration': '190',\n",
       "      'polyline': '113.678711,23.63036;113.678711,23.62934;113.678711,23.62934;113.678711,23.629193;113.678689,23.629084;113.678637,23.629023;113.678424,23.628902;113.678368,23.628841;113.678316,23.628724;113.678294,23.628611;113.678294,23.628611;113.678277,23.628372',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向南步行498米向右前方行走',\n",
       "      'orientation': '南',\n",
       "      'road': [],\n",
       "      'distance': '498',\n",
       "      'duration': '398',\n",
       "      'polyline': '113.678273,23.628368;113.678572,23.628338;113.678685,23.628307;113.678685,23.628307;113.678845,23.628234;113.679045,23.628073;113.679158,23.627964;113.679158,23.627964;113.679214,23.627869;113.679236,23.627778;113.67928,23.627526;113.679288,23.627322;113.679288,23.627322;113.679253,23.626853;113.679184,23.626623;113.679141,23.626497;113.679002,23.626259;113.678941,23.626176;113.678711,23.625977;113.67862,23.625864;113.678529,23.62572;113.678438,23.625191;113.678429,23.625056;113.678451,23.624939;113.678572,23.624657',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向西南步行722米左转',\n",
       "      'orientation': '西南',\n",
       "      'road': [],\n",
       "      'distance': '722',\n",
       "      'duration': '578',\n",
       "      'polyline': '113.678572,23.624653;113.678559,23.62451;113.678416,23.624323;113.678416,23.624323;113.677582,23.623793;113.676532,23.623346;113.676363,23.623255;113.676272,23.623151;113.676111,23.622834;113.676042,23.622739;113.67579,23.622483;113.675499,23.622279;113.675417,23.622174;113.675386,23.622088;113.675378,23.621836;113.675378,23.621836;113.675391,23.62161;113.675434,23.621476;113.675543,23.621359;113.675764,23.621181;113.675846,23.621089;113.675903,23.620994;113.675907,23.620855;113.675877,23.620725;113.675747,23.620547;113.675599,23.620373;113.675243,23.620013',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向东南步行412米向右前方行走',\n",
       "      'orientation': '东南',\n",
       "      'road': [],\n",
       "      'distance': '412',\n",
       "      'duration': '330',\n",
       "      'polyline': '113.675239,23.620009;113.67549,23.620013;113.675642,23.619991;113.675773,23.619948;113.676016,23.619796;113.676901,23.619193;113.677261,23.618785;113.678069,23.61783;113.678069,23.61783;113.678181,23.617656',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿乌土街向南步行1381米右转',\n",
       "      'orientation': '南',\n",
       "      'road': '乌土街',\n",
       "      'distance': '1381',\n",
       "      'duration': '1105',\n",
       "      'polyline': '113.678181,23.617652;113.678095,23.617205;113.678051,23.617075;113.677973,23.616923;113.677743,23.616558;113.677609,23.616289;113.677391,23.615816;113.677339,23.615668;113.67714,23.614826;113.677049,23.614323;113.676927,23.613359;113.676845,23.612786;113.676602,23.611489;113.676415,23.610438;113.676411,23.610265;113.676411,23.610265;113.676489,23.609848;113.676502,23.609622;113.676493,23.609236;113.676415,23.608746;113.676415,23.608485;113.67648,23.60819;113.67661,23.607734;113.676819,23.606736;113.676862,23.606541;113.676914,23.606415;113.677014,23.606254;113.677535,23.605673',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿乌土街向西南步行165米直行',\n",
       "      'orientation': '西南',\n",
       "      'road': '乌土街',\n",
       "      'distance': '165',\n",
       "      'duration': '132',\n",
       "      'polyline': '113.677535,23.605668;113.676988,23.605373;113.676402,23.605;113.676163,23.604887',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿934县道向西步行118米直行',\n",
       "      'orientation': '西',\n",
       "      'road': '934县道',\n",
       "      'distance': '118',\n",
       "      'duration': '94',\n",
       "      'polyline': '113.676159,23.604883;113.675799,23.604805;113.675508,23.604779;113.675508,23.604779;113.675013,23.60474',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿桃园东路向西南步行674米向右前方行走',\n",
       "      'orientation': '西南',\n",
       "      'road': '桃园东路',\n",
       "      'distance': '674',\n",
       "      'duration': '539',\n",
       "      'polyline': '113.675009,23.604735;113.674236,23.604683;113.673893,23.604618;113.673464,23.604492;113.673464,23.604492;113.67168,23.604006;113.671541,23.603958;113.671411,23.603854;113.671068,23.603472;113.670807,23.603264;113.670807,23.603264;113.670525,23.603073;113.6702,23.602904;113.6702,23.602904;113.670022,23.602795;113.670022,23.602795;113.669909,23.602682;113.669818,23.602517;113.669787,23.602413;113.669718,23.601901',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿桃园东路向西南步行247米直行',\n",
       "      'orientation': '西南',\n",
       "      'road': '桃园东路',\n",
       "      'distance': '247',\n",
       "      'duration': '198',\n",
       "      'polyline': '113.669714,23.601897;113.66964,23.601771;113.66964,23.601771;113.669488,23.601558;113.669488,23.601558;113.668789,23.600859;113.668663,23.600768;113.668663,23.600768;113.668442,23.600647;113.667947,23.600417',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿桃园西路向西南步行2775米向右前方行走',\n",
       "      'orientation': '西南',\n",
       "      'road': '桃园西路',\n",
       "      'distance': '2775',\n",
       "      'duration': '2220',\n",
       "      'polyline': '113.667943,23.600412;113.667331,23.600139;113.667331,23.600139;113.666224,23.599644;113.665955,23.599505;113.665955,23.599505;113.665781,23.599362;113.665781,23.599362;113.665521,23.599093;113.665521,23.599093;113.665286,23.598824;113.665286,23.598824;113.665256,23.598785;113.665256,23.598785;113.664796,23.598238;113.664796,23.598238;113.664401,23.597622;113.664401,23.597622;113.664071,23.59714;113.663746,23.59678;113.663746,23.59678;113.663477,23.59651;113.663477,23.59651;113.66224,23.595434;113.66224,23.595434;113.661563,23.594848;113.661563,23.594848;113.661311,23.594605;113.66115,23.594414;113.660907,23.594032;113.660907,23.594032;113.660829,23.593889;113.660729,23.593598;113.660547,23.593025;113.660464,23.592804;113.660464,23.592804;113.659931,23.591593;113.659831,23.591393;113.659631,23.59105;113.659631,23.59105;113.659115,23.59023;113.658824,23.589592;113.658824,23.589592;113.658754,23.589405;113.658754,23.589405;113.657817,23.58714;113.657747,23.586936;113.657695,23.586693;113.657548,23.585369;113.657548,23.585369;113.657483,23.585161;113.657326,23.584896;113.657326,23.584896;113.657114,23.58457;113.657062,23.584453;113.65691,23.583924;113.656884,23.583785;113.656879,23.583681;113.656888,23.583572;113.656979,23.58326;113.657066,23.58303;113.657157,23.582852;113.657378,23.582539;113.657431,23.582444;113.65747,23.582344;113.657483,23.582235;113.657483,23.582109;113.657435,23.580777;113.657405,23.580616;113.657405,23.580616;113.657296,23.580308;113.657244,23.580221;113.656723,23.579644;113.656723,23.579644;113.656597,23.579488;113.656411,23.579362',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿石海工业大道向西南步行1838米直行',\n",
       "      'orientation': '西南',\n",
       "      'road': '石海工业大道',\n",
       "      'distance': '1838',\n",
       "      'duration': '1470',\n",
       "      'polyline': '113.656406,23.579358;113.656055,23.57931;113.656055,23.57931;113.655091,23.579089;113.654918,23.579023;113.654566,23.57885;113.654566,23.57885;113.653681,23.578372;113.653681,23.578372;113.653429,23.578247;113.653429,23.578247;113.652713,23.577865;113.652713,23.577865;113.652452,23.577704;113.652001,23.577387;113.652001,23.577387;113.651654,23.577105;113.651654,23.577105;113.651437,23.57694;113.651437,23.57694;113.650681,23.576332;113.650681,23.576332;113.650378,23.576094;113.650378,23.576094;113.649674,23.575534;113.649674,23.575534;113.649583,23.575451;113.649583,23.575451;113.64924,23.575182;113.64924,23.575182;113.647409,23.573754;113.647409,23.573754;113.647279,23.573641;113.646793,23.573155;113.646793,23.573155;113.64661,23.57296;113.64661,23.57296;113.646419,23.572778;113.646419,23.572778;113.646202,23.572565;113.645968,23.57237;113.645252,23.571866;113.645252,23.571866;113.644974,23.571732;113.644974,23.571732;113.644883,23.571706;113.644618,23.571671;113.643967,23.571675;113.643967,23.571675;113.643511,23.57168;113.643511,23.57168;113.64329,23.57168;113.643047,23.571654;113.64293,23.571632;113.642548,23.571502;113.642326,23.571411;113.641979,23.571228;113.641636,23.571003;113.641636,23.571003;113.641437,23.57082',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿政通路向西南步行2161米直行',\n",
       "      'orientation': '西南',\n",
       "      'road': '政通路',\n",
       "      'distance': '2161',\n",
       "      'duration': '1729',\n",
       "      'polyline': '113.641432,23.570816;113.641168,23.570525;113.641168,23.570525;113.640964,23.570265;113.640864,23.570156;113.640864,23.570156;113.640651,23.569978;113.640408,23.569822;113.638902,23.569006;113.638902,23.569006;113.638398,23.568746;113.638056,23.568611;113.637695,23.568529;113.637431,23.568507;113.637209,23.568516;113.637209,23.568516;113.636836,23.568576;113.636836,23.568576;113.636484,23.568676;113.636484,23.568676;113.635334,23.569058;113.633754,23.569614;113.633485,23.569674;113.633251,23.569692;113.633251,23.569692;113.633069,23.569688;113.633069,23.569688;113.632778,23.569635;113.632378,23.569492;113.631992,23.569319;113.631853,23.569223;113.631801,23.569158;113.631701,23.568997;113.631441,23.568338;113.631441,23.568338;113.63128,23.567947;113.63128,23.567947;113.63122,23.567834;113.631089,23.567656;113.630946,23.567526;113.630768,23.567387;113.630768,23.567387;113.630456,23.567157;113.630456,23.567157;113.630113,23.566884;113.630113,23.566884;113.629596,23.566458;113.629063,23.565799;113.628359,23.565174;113.62826,23.565026;113.62806,23.564592;113.627665,23.56395;113.627574,23.563815;113.627413,23.56365;113.626576,23.563003;113.626254,23.562804;113.625964,23.562682;113.624987,23.562365',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿灌村路向西步行781米左转',\n",
       "      'orientation': '西',\n",
       "      'road': '灌村路',\n",
       "      'distance': '781',\n",
       "      'duration': '625',\n",
       "      'polyline': '113.624983,23.562361;113.624431,23.562183;113.62349,23.56191;113.623216,23.561771;113.623003,23.561593;113.622661,23.561185;113.622049,23.560525;113.621936,23.560421;113.621775,23.560317;113.621515,23.560226;113.620226,23.559926;113.619579,23.559761;113.619427,23.559744;113.619427,23.559744;113.619188,23.559731;113.619188,23.559731;113.618555,23.559796;113.618355,23.559839;113.618251,23.559887',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿环市东路向西南步行1583米',\n",
       "      'orientation': '西南',\n",
       "      'road': '环市东路',\n",
       "      'distance': '1583',\n",
       "      'duration': '1266',\n",
       "      'polyline': '113.618247,23.559887;113.617626,23.559271;113.617626,23.559271;113.615794,23.557474;113.615794,23.557474;113.615213,23.556905;113.615213,23.556905;113.614093,23.55579;113.614093,23.55579;113.613832,23.55549;113.613832,23.55549;113.613628,23.555217;113.613628,23.555217;113.613429,23.554926;113.613429,23.554926;113.613138,23.554418;113.612778,23.553516;113.612778,23.553516;113.612756,23.553442;113.612756,23.553442;113.612682,23.553251;113.612682,23.553251;113.612656,23.553181;113.612656,23.553181;113.612344,23.552339;113.612344,23.552339;113.612192,23.551949;113.612192,23.551949;113.61207,23.551658;113.611888,23.551354;113.611606,23.550968;113.611476,23.550812;113.611246,23.550577;113.610551,23.55;113.610551,23.55;113.610065,23.549609;113.610065,23.549609;113.609514,23.549162;113.609514,23.549162;113.609071,23.548746;113.609071,23.548746;113.608971,23.548641',\n",
       "      'action': [],\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿环市东路向南步行1626米右转',\n",
       "      'orientation': '南',\n",
       "      'road': '环市东路',\n",
       "      'distance': '1626',\n",
       "      'duration': '1301',\n",
       "      'polyline': '113.608967,23.548637;113.608707,23.548247;113.608537,23.547921;113.608537,23.547921;113.608416,23.547526;113.608364,23.547266;113.608364,23.547266;113.608333,23.54697;113.608333,23.54697;113.608264,23.546155;113.608264,23.546155;113.608225,23.545664;113.608216,23.545061;113.608273,23.544501;113.608333,23.54418;113.608333,23.54418;113.608359,23.544054;113.608359,23.544054;113.60849,23.54342;113.60849,23.54342;113.608533,23.543199;113.608533,23.543199;113.608906,23.541484;113.608906,23.541484;113.609097,23.540564;113.609097,23.540564;113.609297,23.539661;113.609297,23.539661;113.609497,23.538685;113.609557,23.538307;113.609557,23.538307;113.609601,23.537635;113.609601,23.537635;113.609601,23.537166;113.609553,23.536536;113.609553,23.536536;113.609453,23.535916;113.60928,23.535252;113.608872,23.534223',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿从樟一路向西步行14米左转',\n",
       "      'orientation': '西',\n",
       "      'road': '从樟一路',\n",
       "      'distance': '14',\n",
       "      'duration': '11',\n",
       "      'polyline': '113.608867,23.534219;113.608737,23.534223',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿环市东路向西南步行1098米向右前方行走',\n",
       "      'orientation': '西南',\n",
       "      'road': '环市东路',\n",
       "      'distance': '1098',\n",
       "      'duration': '878',\n",
       "      'polyline': '113.608733,23.534223;113.608242,23.53299;113.608242,23.53299;113.608012,23.532448;113.608012,23.532448;113.607799,23.531914;113.607799,23.531914;113.607682,23.531628;113.607682,23.531628;113.607248,23.530551;113.607248,23.530551;113.606988,23.529931;113.606988,23.529931;113.606866,23.529688;113.606866,23.529688;113.606645,23.529345;113.606484,23.529145;113.606484,23.529145;113.606385,23.529032;113.606385,23.529032;113.606128,23.52878;113.605898,23.528581;113.605898,23.528581;113.604952,23.527786;113.604952,23.527786;113.604388,23.527331;113.604388,23.527331;113.603563,23.526636;113.603563,23.526636;113.60329,23.526636;113.60329,23.526636;113.603199,23.526636;113.603199,23.526636;113.603194,23.526641;113.603207,23.526484;113.603207,23.526484;113.603216,23.526311;113.603216,23.526311;113.603142,23.526233',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '步行24米左转',\n",
       "      'orientation': [],\n",
       "      'road': [],\n",
       "      'distance': '24',\n",
       "      'duration': '19',\n",
       "      'polyline': '113.603138,23.526228;113.602908,23.526289',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '1'},\n",
       "     {'instruction': '沿环市东路步行79米向右前方行走',\n",
       "      'orientation': [],\n",
       "      'road': '环市东路',\n",
       "      'distance': '79',\n",
       "      'duration': '63',\n",
       "      'polyline': '113.602904,23.526289;113.602886,23.526141;113.602769,23.525777;113.602769,23.525777;113.602656,23.525621',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿从城大道步行52米左转',\n",
       "      'orientation': [],\n",
       "      'road': '从城大道',\n",
       "      'distance': '52',\n",
       "      'duration': '42',\n",
       "      'polyline': '113.602652,23.525616;113.602448,23.52549;113.602244,23.525399;113.602244,23.525399;113.602205,23.525391',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '步行31米向左前方行走',\n",
       "      'orientation': [],\n",
       "      'road': [],\n",
       "      'distance': '31',\n",
       "      'duration': '25',\n",
       "      'polyline': '113.602201,23.525386;113.60227,23.525109',\n",
       "      'action': '向左前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '1'},\n",
       "     {'instruction': '沿从城大道向东南步行13米右转',\n",
       "      'orientation': '东南',\n",
       "      'road': '从城大道',\n",
       "      'distance': '13',\n",
       "      'duration': '10',\n",
       "      'polyline': '113.60227,23.525104;113.602378,23.525039',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿环市东路向西南步行21米直行',\n",
       "      'orientation': '西南',\n",
       "      'road': '环市东路',\n",
       "      'distance': '21',\n",
       "      'duration': '17',\n",
       "      'polyline': '113.602378,23.525035;113.602257,23.524878',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿广从公路向西南步行8193米直行',\n",
       "      'orientation': '西南',\n",
       "      'road': '广从公路',\n",
       "      'distance': '8193',\n",
       "      'duration': '6554',\n",
       "      'polyline': '113.602253,23.524874;113.601923,23.524431;113.601923,23.524431;113.601589,23.523976;113.601437,23.523806;113.601437,23.523806;113.601289,23.523633;113.601289,23.523633;113.601068,23.523433;113.601068,23.523433;113.600755,23.523212;113.600634,23.523142;113.600373,23.523016;113.600373,23.523016;113.600091,23.522921;113.599648,23.522826;113.599648,23.522826;113.599123,23.522773;113.599123,23.522773;113.598711,23.522739;113.598711,23.522739;113.5974,23.52263;113.5974,23.52263;113.596467,23.522561;113.596467,23.522561;113.595842,23.522513;113.595842,23.522513;113.595486,23.522487;113.595486,23.522487;113.595195,23.522465;113.595195,23.522465;113.594965,23.522444;113.594965,23.522444;113.594523,23.522413;113.594523,23.522413;113.593707,23.522348;113.593707,23.522348;113.59293,23.522287;113.59293,23.522287;113.591884,23.522196;113.591884,23.522196;113.591793,23.522192;113.591793,23.522192;113.591684,23.522179;113.591684,23.522179;113.591454,23.522166;113.591454,23.522166;113.590907,23.522105;113.590356,23.522023;113.590356,23.522023;113.589878,23.521914;113.58931,23.521732;113.58931,23.521732;113.589175,23.521688;113.588572,23.521437;113.587986,23.521128;113.587604,23.520903;113.587205,23.520625;113.586536,23.520095;113.586536,23.520095;113.585755,23.519453;113.585755,23.519453;113.584766,23.518637;113.584766,23.518637;113.584536,23.518446;113.584536,23.518446;113.583047,23.517231;113.583047,23.517231;113.582088,23.516432;113.582088,23.516432;113.581766,23.516168;113.581766,23.516168;113.581315,23.515794;113.581315,23.515794;113.580499,23.515126;113.580499,23.515126;113.579957,23.514709;113.579957,23.514709;113.579683,23.51454;113.579683,23.51454;113.579158,23.514258;113.578607,23.514028;113.578607,23.514028;113.577057,23.513485;113.577057,23.513485;113.576762,23.513377;113.576762,23.513377;113.576076,23.513138;113.576076,23.513138;113.575703,23.513003;113.575104,23.512765;113.574488,23.512491;113.574488,23.512491;113.574023,23.512261;113.574023,23.512261;113.573307,23.511862;113.572643,23.511445;113.572174,23.51112;113.571701,23.510738;113.571055,23.510178;113.571055,23.510178;113.570885,23.510017;113.570421,23.509484;113.570095,23.508967;113.570095,23.508967;113.569696,23.508307;113.569696,23.508307;113.569566,23.508095;113.569566,23.508095;113.569444,23.507895;113.569444,23.507895;113.569141,23.507396;113.569141,23.507396;113.56885,23.506931;113.56885,23.506931;113.568598,23.506523;113.568598,23.506523;113.568394,23.506181;113.568394,23.506181;113.567964,23.505495;113.567964,23.505495;113.567639,23.50503;113.567639,23.50503;113.567439,23.5048;113.567209,23.504575;113.567209,23.504575;113.566966,23.504353;113.566966,23.504353;113.566714,23.504158;113.566506,23.50401;113.566042,23.50375;113.566042,23.50375;113.565516,23.503516;113.564492,23.503125;113.564492,23.503125;113.562405,23.502322;113.562405,23.502322;113.560747,23.501693;113.560747,23.501693;113.560082,23.501441;113.560082,23.501441;113.559457,23.501207;113.559457,23.501207;113.559145,23.501085;113.559145,23.501085;113.558277,23.500725;113.558277,23.500725;113.557865,23.500556;113.557865,23.500556;113.557305,23.500299;113.556897,23.500048;113.556519,23.499792;113.55556,23.498984;113.55556,23.498984;113.555291,23.498776;113.555291,23.498776;113.554965,23.498529;113.554965,23.498529;113.554514,23.498234;113.554514,23.498234;113.554193,23.498047;113.554193,23.498047;113.553811,23.49783;113.553811,23.49783;113.552912,23.497357;113.552912,23.497357;113.550434,23.496016;113.550434,23.496016;113.549457,23.495477;113.549457,23.495477;113.548867,23.495161;113.548867,23.495161;113.548715,23.495074;113.548715,23.495074;113.547535,23.494431;113.546953,23.494062;113.546602,23.493819;113.546137,23.493459;113.546137,23.493459;113.546059,23.493407;113.546059,23.493407;113.545755,23.493225;113.545755,23.493225;113.545734,23.493207;113.545734,23.493207;113.545082,23.492834;113.545082,23.492834;113.544796,23.492661;113.544444,23.492418;113.544444,23.492418;113.543802,23.492005;113.543802,23.492005;113.542956,23.491419;113.542148,23.490924;113.541706,23.490725;113.541345,23.490599;113.541345,23.490599;113.541293,23.490586;113.541293,23.490586;113.540451,23.490382;113.540451,23.490382;113.536523,23.489384;113.536523,23.489384;113.536141,23.489293;113.536141,23.489293;113.535516,23.489141;113.535516,23.489141;113.535313,23.489084;113.535313,23.489084;113.535052,23.489015;113.534679,23.488885',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿广从北路向西南步行353米',\n",
       "      'orientation': '西南',\n",
       "      'road': '广从北路',\n",
       "      'distance': '353',\n",
       "      'duration': '282',\n",
       "      'polyline': '113.534674,23.48888;113.534054,23.488672;113.533715,23.488524;113.533715,23.488524;113.533212,23.488294;113.533212,23.488294;113.5327,23.487977;113.5327,23.487977;113.531719,23.487266',\n",
       "      'action': [],\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿广从北路辅路向西南步行360米直行',\n",
       "      'orientation': '西南',\n",
       "      'road': '广从北路辅路',\n",
       "      'distance': '360',\n",
       "      'duration': '288',\n",
       "      'polyline': '113.531714,23.487261;113.531649,23.487092;113.531146,23.486519;113.531146,23.486519;113.531037,23.486393;113.531037,23.486393;113.530373,23.485595;113.530373,23.485595;113.529857,23.484926;113.529857,23.484926;113.529674,23.484701;113.529674,23.484701;113.529614,23.484618',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿广从南路辅路向西南步行351米直行',\n",
       "      'orientation': '西南',\n",
       "      'road': '广从南路辅路',\n",
       "      'distance': '351',\n",
       "      'duration': '281',\n",
       "      'polyline': '113.529609,23.484614;113.529353,23.484288;113.529353,23.484288;113.528668,23.483407;113.528668,23.483407;113.528194,23.482778;113.528194,23.482778;113.527834,23.482339;113.527834,23.482339;113.527752,23.482227;113.527513,23.482105',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿广从南路向西南步行1164米向左前方行走',\n",
       "      'orientation': '西南',\n",
       "      'road': '广从南路',\n",
       "      'distance': '1164',\n",
       "      'duration': '931',\n",
       "      'polyline': '113.527509,23.482101;113.526997,23.481445;113.526997,23.481445;113.526354,23.480629;113.526354,23.480629;113.52599,23.480182;113.52599,23.480182;113.525972,23.480161;113.525972,23.480161;113.525104,23.479015;113.524887,23.478772;113.52454,23.478446;113.52434,23.47829;113.52434,23.47829;113.524149,23.478155;113.524149,23.478155;113.524041,23.47809;113.522578,23.477283;113.522578,23.477283;113.521866,23.476879;113.52128,23.476567;113.52128,23.476567;113.520707,23.476254;113.520707,23.476254;113.520464,23.476128;113.520464,23.476128;113.5199,23.475842;113.5199,23.475842;113.519839,23.475812;113.519839,23.475812;113.519648,23.475729;113.519175,23.47559;113.519175,23.47559;113.518924,23.475512',\n",
       "      'action': '向左前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿广从南路辅路向西步行747米直行',\n",
       "      'orientation': '西',\n",
       "      'road': '广从南路辅路',\n",
       "      'distance': '747',\n",
       "      'duration': '598',\n",
       "      'polyline': '113.518919,23.475508;113.518754,23.475352;113.518051,23.475117;113.518051,23.475117;113.517435,23.474913;113.517435,23.474913;113.51661,23.474653;113.51661,23.474653;113.515846,23.474423;113.515846,23.474423;113.515673,23.474375;113.515673,23.474375;113.515543,23.474336;113.515543,23.474336;113.51546,23.47431;113.51546,23.47431;113.515161,23.474219;113.515161,23.474219;113.513889,23.473824;113.513889,23.473824;113.513707,23.473772;113.513707,23.473772;113.512292,23.473338;113.512005,23.473351',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿广从南路向西南步行3133米向左前方行走',\n",
       "      'orientation': '西南',\n",
       "      'road': '广从南路',\n",
       "      'distance': '3133',\n",
       "      'duration': '2506',\n",
       "      'polyline': '113.512001,23.473351;113.511576,23.473225;113.511576,23.473225;113.511363,23.473155;113.511363,23.473155;113.510942,23.473025;113.510942,23.473025;113.509922,23.472704;113.508637,23.472205;113.507973,23.471888;113.506871,23.471319;113.506871,23.471319;113.505334,23.470521;113.505334,23.470521;113.504909,23.470295;113.504909,23.470295;113.503589,23.469618;113.503589,23.469618;113.502817,23.46921;113.502817,23.46921;113.501901,23.468737;113.501901,23.468737;113.501506,23.468533;113.501506,23.468533;113.501102,23.468307;113.501102,23.468307;113.500864,23.468168;113.500864,23.468168;113.500651,23.468021;113.500208,23.467665;113.500208,23.467665;113.499813,23.467257;113.499635,23.46704;113.499635,23.46704;113.499362,23.466641;113.499184,23.466298;113.499184,23.466298;113.498668,23.465213;113.498668,23.465213;113.498576,23.465013;113.498576,23.465013;113.498529,23.464918;113.498529,23.464918;113.497088,23.461871;113.497088,23.461871;113.496814,23.461319;113.496602,23.460929;113.496424,23.46066;113.49625,23.460434;113.49625,23.460434;113.496133,23.460282;113.496133,23.460282;113.495339,23.459327;113.495339,23.459327;113.494991,23.458906;113.494991,23.458906;113.494479,23.458294;113.494479,23.458294;113.494089,23.457812;113.493806,23.457439;113.493806,23.457439;113.493516,23.456984;113.493516,23.456984;113.493264,23.456515;113.493264,23.456515;113.492921,23.455781;113.4927,23.455161;113.492565,23.454674;113.492313,23.453507',\n",
       "      'action': '向左前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿广从南路辅路向南步行1214米直行',\n",
       "      'orientation': '南',\n",
       "      'road': '广从南路辅路',\n",
       "      'distance': '1214',\n",
       "      'duration': '971',\n",
       "      'polyline': '113.492309,23.453503;113.492374,23.453355;113.492335,23.453073;113.492335,23.453073;113.492227,23.452461;113.492227,23.452461;113.492096,23.451879;113.492096,23.451879;113.491962,23.45125;113.491962,23.45125;113.491762,23.450508;113.491762,23.450508;113.491402,23.44885;113.491402,23.44885;113.491259,23.448164;113.491259,23.448164;113.49115,23.447674;113.49115,23.447674;113.491029,23.447122;113.491029,23.447122;113.490877,23.446437;113.490877,23.446437;113.490864,23.446345;113.490864,23.446345;113.490786,23.446016;113.490786,23.446016;113.490582,23.445143;113.490582,23.445143;113.490521,23.444887;113.490521,23.444887;113.490313,23.444006;113.490313,23.444006;113.490269,23.443819;113.490269,23.443819;113.490048,23.44303;113.490048,23.44303;113.490009,23.442873;113.489918,23.442756',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿广从南路向西南步行1201米直行',\n",
       "      'orientation': '西南',\n",
       "      'road': '广从南路',\n",
       "      'distance': '1201',\n",
       "      'duration': '961',\n",
       "      'polyline': '113.489913,23.442752;113.489826,23.442435;113.489826,23.442435;113.489809,23.442383;113.489809,23.442383;113.489648,23.441662;113.489648,23.441662;113.489579,23.441341;113.489579,23.441341;113.489336,23.440278;113.489336,23.440278;113.489214,23.439835;113.489145,23.43964;113.489145,23.43964;113.488924,23.43908;113.488793,23.438824;113.488598,23.438477;113.488247,23.437973;113.488247,23.437973;113.487843,23.437483;113.487843,23.437483;113.487595,23.437205;113.487595,23.437205;113.486888,23.436541;113.486888,23.436541;113.486758,23.436415;113.486758,23.436415;113.486285,23.435972;113.486285,23.435972;113.485803,23.435508;113.485803,23.435508;113.485582,23.435295;113.485582,23.435295;113.485469,23.435182;113.485469,23.435182;113.484544,23.434327;113.484544,23.434327;113.484089,23.433919;113.484089,23.433919;113.483872,23.433737',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿广从南路辅路向西南步行464米向左前方行走',\n",
       "      'orientation': '西南',\n",
       "      'road': '广从南路辅路',\n",
       "      'distance': '464',\n",
       "      'duration': '371',\n",
       "      'polyline': '113.483867,23.433733;113.483811,23.433641;113.483689,23.433529;113.483689,23.433529;113.483516,23.433364;113.483516,23.433364;113.483433,23.433286;113.483433,23.433286;113.483364,23.433225;113.483364,23.433225;113.482943,23.432839;113.482943,23.432839;113.482895,23.432804;113.482895,23.432804;113.482652,23.432578;113.482652,23.432578;113.482461,23.432431;113.482461,23.432431;113.482361,23.432348;113.482361,23.432348;113.481845,23.431927;113.481845,23.431927;113.481706,23.431801;113.481463,23.431615;113.481463,23.431615;113.481332,23.43151;113.480777,23.430903;113.480777,23.430903;113.480638,23.430729',\n",
       "      'action': '向左前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿广从南路辅路步行45米向右后方行走',\n",
       "      'orientation': [],\n",
       "      'road': '广从南路辅路',\n",
       "      'distance': '45',\n",
       "      'duration': '36',\n",
       "      'polyline': '113.480634,23.430725;113.480642,23.430503;113.480642,23.430503;113.480694,23.430391;113.480734,23.430343',\n",
       "      'action': '向右后方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿太平东路向西步行34米左转',\n",
       "      'orientation': '西',\n",
       "      'road': '太平东路',\n",
       "      'distance': '34',\n",
       "      'duration': '27',\n",
       "      'polyline': '113.480734,23.430339;113.480417,23.43043',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿广从南路辅路向西南步行416米直行',\n",
       "      'orientation': '西南',\n",
       "      'road': '广从南路辅路',\n",
       "      'distance': '416',\n",
       "      'duration': '333',\n",
       "      'polyline': '113.480412,23.43043;113.480356,23.430343;113.480356,23.430343;113.480165,23.43003;113.480165,23.43003;113.479588,23.429028;113.479588,23.429028;113.47928,23.428503;113.47928,23.428503;113.478715,23.427526;113.478372,23.42717',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿广从南路向南步行31米',\n",
       "      'orientation': '南',\n",
       "      'road': '广从南路',\n",
       "      'distance': '31',\n",
       "      'duration': '25',\n",
       "      'polyline': '113.478368,23.427166;113.478303,23.426997;113.47826,23.42691',\n",
       "      'action': [],\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿广从南路向西南步行281米向左前方行走',\n",
       "      'orientation': '西南',\n",
       "      'road': '广从南路',\n",
       "      'distance': '281',\n",
       "      'duration': '225',\n",
       "      'polyline': '113.478255,23.426905;113.477817,23.426185;113.477817,23.426185;113.477587,23.425794;113.477587,23.425794;113.477444,23.42553;113.477266,23.425165;113.476962,23.424657',\n",
       "      'action': '向左前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向南步行140米左转',\n",
       "      'orientation': '南',\n",
       "      'road': [],\n",
       "      'distance': '140',\n",
       "      'duration': '112',\n",
       "      'polyline': '113.476957,23.424653;113.476693,23.423772;113.476571,23.423437',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿登塘矮岭西路向南步行987米直行',\n",
       "      'orientation': '南',\n",
       "      'road': '登塘矮岭西路',\n",
       "      'distance': '987',\n",
       "      'duration': '790',\n",
       "      'polyline': '113.476567,23.423433;113.477079,23.423108;113.477161,23.423021;113.47724,23.42293;113.477882,23.421801;113.477973,23.42158;113.477973,23.42158;113.478077,23.420938;113.478077,23.420816;113.478077,23.420816;113.478077,23.420061;113.478134,23.419779;113.478147,23.41964;113.478147,23.419527;113.478121,23.419384;113.477808,23.418138;113.477778,23.417969;113.477769,23.417865;113.477812,23.417391;113.477934,23.41661;113.477934,23.41661;113.478056,23.415773;113.478056,23.415773;113.478134,23.415326;113.478199,23.415043',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿083乡道向南步行177米左转',\n",
       "      'orientation': '南',\n",
       "      'road': '083乡道',\n",
       "      'distance': '177',\n",
       "      'duration': '142',\n",
       "      'polyline': '113.478199,23.415039;113.478286,23.414661;113.478437,23.414115;113.478437,23.414115;113.478459,23.413993;113.478468,23.413859;113.478424,23.413468',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿九佛西路向东南步行2131米直行',\n",
       "      'orientation': '东南',\n",
       "      'road': '九佛西路',\n",
       "      'distance': '2131',\n",
       "      'duration': '1705',\n",
       "      'polyline': '113.47842,23.413464;113.478477,23.413446;113.478477,23.413446;113.479596,23.41303;113.479596,23.41303;113.480651,23.412626;113.481176,23.41237;113.481489,23.412174;113.481749,23.411979;113.481949,23.411801;113.482101,23.411654;113.482101,23.411654;113.482435,23.411246;113.482708,23.410859;113.482708,23.410859;113.482986,23.410456;113.482986,23.410456;113.483976,23.409054;113.483976,23.409054;113.485365,23.407088;113.485365,23.407088;113.485868,23.406389;113.486181,23.405911;113.486181,23.405911;113.486211,23.405864;113.486211,23.405864;113.486359,23.405612;113.486484,23.40533;113.486484,23.40533;113.48661,23.405009;113.486675,23.404748;113.486675,23.404748;113.486732,23.40447;113.486753,23.404106;113.486753,23.404106;113.486753,23.403772;113.486753,23.403772;113.48671,23.403385;113.48671,23.403385;113.486675,23.403194;113.486675,23.403194;113.486597,23.402865;113.486428,23.402292;113.486428,23.402292;113.486293,23.401727;113.486293,23.401727;113.486233,23.401276;113.486224,23.400768;113.486224,23.400768;113.48625,23.400486;113.486302,23.400109;113.486441,23.399583;113.486441,23.399583;113.486645,23.399041;113.486862,23.398655;113.487096,23.398299;113.487096,23.398299;113.48724,23.398108;113.487509,23.397795',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿九龙大道向南步行1878米左转',\n",
       "      'orientation': '南',\n",
       "      'road': '九龙大道',\n",
       "      'distance': '1878',\n",
       "      'duration': '1502',\n",
       "      'polyline': '113.487509,23.397791;113.489119,23.396068;113.489119,23.396068;113.489392,23.395777;113.489392,23.395777;113.489714,23.395399;113.489896,23.395135;113.489896,23.395135;113.490126,23.394761;113.490126,23.394761;113.490247,23.39451;113.490451,23.393963;113.490451,23.393963;113.490538,23.393628;113.490538,23.393628;113.490582,23.393433;113.490582,23.393433;113.490599,23.39329;113.490599,23.39329;113.490638,23.392799;113.490638,23.392799;113.490625,23.392244;113.490551,23.391489;113.490551,23.391489;113.490521,23.391081;113.490503,23.390443;113.490521,23.389996;113.49056,23.389696;113.49056,23.389696;113.490612,23.389392;113.490781,23.388672;113.490781,23.388672;113.490864,23.388364;113.490864,23.388364;113.491194,23.387144;113.491194,23.387144;113.491345,23.386593;113.491345,23.386593;113.491506,23.38599;113.491506,23.38599;113.491576,23.385747;113.491576,23.385747;113.49237,23.382904;113.49237,23.382904;113.492461,23.382548;113.492461,23.382548;113.492635,23.382374;113.492704,23.382344;113.492704,23.382344;113.492556,23.382244;113.492556,23.382244;113.492604,23.382057',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '步行28米右转',\n",
       "      'orientation': [],\n",
       "      'road': [],\n",
       "      'distance': '28',\n",
       "      'duration': '22',\n",
       "      'polyline': '113.492604,23.382053;113.492865,23.381949',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '1'},\n",
       "     {'instruction': '步行34米向左前方行走',\n",
       "      'orientation': [],\n",
       "      'road': [],\n",
       "      'distance': '34',\n",
       "      'duration': '27',\n",
       "      'polyline': '113.492865,23.381944;113.49283,23.381866;113.49283,23.381866;113.492756,23.381649',\n",
       "      'action': '向左前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿九龙大道向东南步行2089米右转',\n",
       "      'orientation': '东南',\n",
       "      'road': '九龙大道',\n",
       "      'distance': '2089',\n",
       "      'duration': '1671',\n",
       "      'polyline': '113.492752,23.381645;113.492786,23.381558;113.492786,23.381558;113.492973,23.381102;113.492973,23.381102;113.493225,23.380551;113.493507,23.380035;113.493733,23.379644;113.493733,23.379644;113.494505,23.378342;113.494505,23.378342;113.494748,23.377925;113.494748,23.377925;113.494948,23.377587;113.494948,23.377587;113.494978,23.377539;113.494978,23.377539;113.495213,23.377131;113.495213,23.377131;113.495556,23.376558;113.495556,23.376558;113.495625,23.376445;113.495625,23.376445;113.496228,23.375551;113.496228,23.375551;113.496458,23.375239;113.496701,23.374948;113.496701,23.374948;113.49678,23.374861;113.49678,23.374861;113.497135,23.374479;113.497322,23.374232;113.497756,23.373581;113.49803,23.373251;113.49803,23.373251;113.498242,23.372982;113.49855,23.372708;113.499783,23.371706;113.499783,23.371706;113.499991,23.371532;113.499991,23.371532;113.500286,23.371263;113.500286,23.371263;113.500629,23.370998;113.501667,23.370082;113.501667,23.370082;113.50247,23.369345;113.503498,23.368338;113.503498,23.368338;113.503646,23.368199;113.503646,23.368199;113.504501,23.367374;113.504501,23.367374;113.505126,23.366766',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '步行17米左转',\n",
       "      'orientation': [],\n",
       "      'road': [],\n",
       "      'distance': '17',\n",
       "      'duration': '14',\n",
       "      'polyline': '113.505126,23.366762;113.505009,23.366649',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '1'},\n",
       "     {'instruction': '沿九龙大道向东南步行5618米向右前方行走',\n",
       "      'orientation': '东南',\n",
       "      'road': '九龙大道',\n",
       "      'distance': '5618',\n",
       "      'duration': '4494',\n",
       "      'polyline': '113.505004,23.366645;113.50533,23.366337;113.50533,23.366337;113.505972,23.365668;113.506536,23.365017;113.506536,23.365017;113.506615,23.364922;113.506615,23.364922;113.507895,23.363559;113.507895,23.363559;113.507986,23.363459;113.507986,23.363459;113.50865,23.362813;113.50865,23.362813;113.508945,23.362578;113.508945,23.362578;113.509466,23.36217;113.509466,23.36217;113.510017,23.36174;113.510213,23.361545;113.510391,23.361398;113.510916,23.360985;113.511762,23.360239;113.511762,23.360239;113.512266,23.359753;113.512266,23.359753;113.512305,23.359714;113.512305,23.359714;113.512847,23.359188;113.512847,23.359188;113.513342,23.358707;113.513694,23.358398;113.513694,23.358398;113.514492,23.357747;113.514492,23.357747;113.514648,23.357635;113.514648,23.357635;113.51579,23.356793;113.516189,23.35648;113.516189,23.35648;113.516797,23.355998;113.517309,23.355573;113.517309,23.355573;113.517491,23.355404;113.517491,23.355404;113.517561,23.355343;113.517561,23.355343;113.517964,23.354978;113.517964,23.354978;113.518299,23.354661;113.518299,23.354661;113.518898,23.354089;113.518898,23.354089;113.519978,23.353025;113.519978,23.353025;113.520048,23.35296;113.520048,23.35296;113.520126,23.352886;113.520126,23.352886;113.520421,23.35263;113.520421,23.35263;113.520764,23.352348;113.520764,23.352348;113.521337,23.351931;113.521337,23.351931;113.521597,23.351766;113.521597,23.351766;113.521953,23.351523;113.521953,23.351523;113.522214,23.351345;113.522214,23.351345;113.522526,23.351137;113.522526,23.351137;113.522747,23.350994;113.522747,23.350994;113.52309,23.350755;113.52309,23.350755;113.523602,23.350399;113.523602,23.350399;113.523633,23.350373;113.523633,23.350373;113.524097,23.350091;113.524097,23.350091;113.524158,23.350052;113.524158,23.350052;113.52477,23.34964;113.52477,23.34964;113.525291,23.349275;113.525291,23.349275;113.525456,23.349158;113.525456,23.349158;113.526419,23.348472;113.526419,23.348472;113.527183,23.347912;113.527183,23.347912;113.527214,23.347895;113.527214,23.347895;113.528385,23.347018;113.528385,23.347018;113.528533,23.346901;113.528533,23.346901;113.529197,23.346393;113.529197,23.346393;113.52947,23.346194;113.52947,23.346194;113.529957,23.345825;113.530399,23.345451;113.530399,23.345451;113.530859,23.345022;113.530859,23.345022;113.531059,23.344818;113.531059,23.344818;113.531918,23.343941;113.531918,23.343941;113.53207,23.343789;113.53207,23.343789;113.533194,23.342656;113.533194,23.342656;113.533537,23.342335;113.533963,23.341988;113.533963,23.341988;113.534514,23.341584;113.534887,23.341328;113.534887,23.341328;113.535169,23.34115;113.535169,23.34115;113.535773,23.34079;113.53651,23.340434;113.53701,23.340221;113.53701,23.340221;113.537526,23.340004;113.537526,23.340004;113.538116,23.339757;113.538533,23.339523;113.538984,23.339232;113.538984,23.339232;113.539397,23.338915;113.539783,23.338581;113.540039,23.338316;113.540252,23.338073;113.540252,23.338073;113.540577,23.337643;113.540738,23.3374;113.541016,23.336914;113.541016,23.336914;113.541328,23.336237;113.541523,23.335703;113.541523,23.335703;113.541671,23.335326;113.541671,23.335326;113.542517,23.333103;113.542517,23.333103;113.542973,23.332222;113.542973,23.332222;113.543051,23.33207;113.543051,23.33207;113.543151,23.331914;113.543151,23.331914;113.54322,23.33181;113.54322,23.33181;113.543433,23.331402;113.543433,23.331402;113.543494,23.331259',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '步行33米左转',\n",
       "      'orientation': [],\n",
       "      'road': [],\n",
       "      'distance': '33',\n",
       "      'duration': '26',\n",
       "      'polyline': '113.543494,23.331254;113.54342,23.330968',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '1'},\n",
       "     {'instruction': '沿九龙大道步行41米向右前方行走',\n",
       "      'orientation': [],\n",
       "      'road': '九龙大道',\n",
       "      'distance': '41',\n",
       "      'duration': '33',\n",
       "      'polyline': '113.543416,23.330968;113.543503,23.330955;113.543555,23.330929;113.543767,23.33079',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿九龙大道向东南步行383米向右前方行走',\n",
       "      'orientation': '东南',\n",
       "      'road': '九龙大道',\n",
       "      'distance': '383',\n",
       "      'duration': '306',\n",
       "      'polyline': '113.543767,23.330786;113.543798,23.330738;113.543798,23.330738;113.543837,23.330677;113.543837,23.330677;113.543958,23.330469;113.543958,23.330469;113.544631,23.329319;113.544631,23.329319;113.544735,23.329128;113.544735,23.329128;113.545087,23.32852;113.545087,23.32852;113.545295,23.32819;113.545599,23.327743',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿凤湖中路向南步行27米向左前方行走',\n",
       "      'orientation': '南',\n",
       "      'road': '凤湖中路',\n",
       "      'distance': '27',\n",
       "      'duration': '22',\n",
       "      'polyline': '113.545599,23.327739;113.545612,23.32763;113.545612,23.327496',\n",
       "      'action': '向左前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '步行5米直行',\n",
       "      'orientation': [],\n",
       "      'road': [],\n",
       "      'distance': '5',\n",
       "      'duration': '4',\n",
       "      'polyline': '113.545612,23.327491;113.545642,23.327452',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '1'},\n",
       "     {'instruction': '步行28米向左前方行走',\n",
       "      'orientation': [],\n",
       "      'road': [],\n",
       "      'distance': '28',\n",
       "      'duration': '22',\n",
       "      'polyline': '113.545642,23.327448;113.545799,23.327244',\n",
       "      'action': '向左前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '步行4米向左前方行走',\n",
       "      'orientation': [],\n",
       "      'road': [],\n",
       "      'distance': '4',\n",
       "      'duration': '3',\n",
       "      'polyline': '113.545799,23.32724;113.54582,23.327214',\n",
       "      'action': '向左前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '1'},\n",
       "     {'instruction': '沿凤湖中路向东步行29米向右前方行走',\n",
       "      'orientation': '东',\n",
       "      'road': '凤湖中路',\n",
       "      'distance': '29',\n",
       "      'duration': '23',\n",
       "      'polyline': '113.54582,23.327209;113.545972,23.327192;113.546094,23.327153',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿九龙大道向东南步行275米向右前方行走',\n",
       "      'orientation': '东南',\n",
       "      'road': '九龙大道',\n",
       "      'distance': '275',\n",
       "      'duration': '220',\n",
       "      'polyline': '113.546094,23.327148;113.546406,23.32684;113.546775,23.326532;113.547088,23.326293;113.547561,23.32599;113.547561,23.32599;113.547713,23.325734;113.547713,23.325734;113.547973,23.325755;113.547973,23.325755;113.548134,23.325673',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '步行23米左转',\n",
       "      'orientation': [],\n",
       "      'road': [],\n",
       "      'distance': '23',\n",
       "      'duration': '18',\n",
       "      'polyline': '113.548134,23.325668;113.548194,23.325469',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '1'},\n",
       "     {'instruction': '沿九龙大道步行652米向右前方行走',\n",
       "      'orientation': [],\n",
       "      'road': '九龙大道',\n",
       "      'distance': '652',\n",
       "      'duration': '522',\n",
       "      'polyline': '113.548194,23.325464;113.548329,23.325477;113.548568,23.325451;113.548568,23.325451;113.548811,23.325339;113.548811,23.325339;113.549284,23.325091;113.549709,23.324848;113.54987,23.324735;113.550148,23.32447;113.55056,23.324049;113.55056,23.324049;113.550582,23.324023;113.550582,23.324023;113.551471,23.323112;113.551471,23.323112;113.55171,23.322865;113.55171,23.322865;113.55197,23.322604;113.55197,23.322604;113.551984,23.322587;113.551984,23.322587;113.552405,23.322161;113.552405,23.322161;113.552426,23.322105;113.552556,23.321931;113.552565,23.321827;113.552565,23.321827;113.552739,23.321827;113.552739,23.321827;113.552856,23.321714',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '步行25米左转',\n",
       "      'orientation': [],\n",
       "      'road': [],\n",
       "      'distance': '25',\n",
       "      'duration': '20',\n",
       "      'polyline': '113.552856,23.32171;113.55283,23.32148',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '1'},\n",
       "     {'instruction': '沿九龙大道步行32米向右前方行走',\n",
       "      'orientation': [],\n",
       "      'road': '九龙大道',\n",
       "      'distance': '32',\n",
       "      'duration': '26',\n",
       "      'polyline': '113.552826,23.321476;113.553008,23.321454;113.553138,23.321415',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿九龙大道向东南步行5256米向右前方行走',\n",
       "      'orientation': '东南',\n",
       "      'road': '九龙大道',\n",
       "      'distance': '5256',\n",
       "      'duration': '4205',\n",
       "      'polyline': '113.553138,23.321411;113.553572,23.320933;113.554054,23.320469;113.556133,23.318628;113.556523,23.318247;113.556523,23.318247;113.556645,23.318121;113.556645,23.318121;113.556753,23.318012;113.556753,23.318012;113.557049,23.317669;113.557387,23.317244;113.557387,23.317244;113.557418,23.317201;113.557418,23.317201;113.557812,23.316602;113.558043,23.316198;113.558212,23.315872;113.558212,23.315872;113.558403,23.315451;113.558655,23.314813;113.55898,23.313815;113.559219,23.313203;113.559462,23.312708;113.559592,23.312465;113.559865,23.312053;113.559865,23.312053;113.559948,23.311936;113.559948,23.311936;113.559987,23.311879;113.559987,23.311879;113.560317,23.31148;113.560317,23.31148;113.560712,23.311063;113.561302,23.310577;113.561927,23.310148;113.562734,23.309644;113.563411,23.309154;113.563411,23.309154;113.563741,23.308893;113.564136,23.308494;113.564453,23.308138;113.564453,23.308138;113.56487,23.307561;113.565069,23.307244;113.565291,23.306849;113.565291,23.306849;113.565551,23.306302;113.565551,23.306302;113.565612,23.306163;113.565612,23.306163;113.56681,23.303338;113.56681,23.303338;113.567044,23.302817;113.567044,23.302817;113.567183,23.302504;113.567183,23.302504;113.567235,23.302378;113.567235,23.302378;113.567487,23.301819;113.567739,23.301319;113.568043,23.300851;113.56839,23.300391;113.56839,23.300391;113.568624,23.300109;113.569136,23.299553;113.569136,23.299553;113.569197,23.299484;113.569197,23.299484;113.569722,23.298915;113.570095,23.298481;113.570095,23.298481;113.570273,23.298264;113.570273,23.298264;113.570456,23.298034;113.570456,23.298034;113.570838,23.297483;113.571194,23.296897;113.571194,23.296897;113.571224,23.296849;113.571224,23.296849;113.571823,23.29579;113.57217,23.295204;113.57217,23.295204;113.572361,23.294922;113.572361,23.294922;113.572478,23.294735;113.572478,23.294735;113.57253,23.294657;113.57253,23.294657;113.572643,23.29451;113.572643,23.29451;113.572943,23.294136;113.572943,23.294136;113.573385,23.293585;113.573385,23.293585;113.574141,23.292704;113.574141,23.292704;113.574262,23.292552;113.574262,23.292552;113.574813,23.291892;113.575569,23.290924;113.575955,23.29046;113.575955,23.29046;113.576072,23.290308;113.576072,23.290308;113.576215,23.290117;113.576215,23.290117;113.576415,23.289883;113.576415,23.289883;113.576888,23.289301;113.576888,23.289301;113.577335,23.28875;113.577335,23.28875;113.577795,23.288181;113.577795,23.288181;113.577995,23.287934;113.577995,23.287934;113.579054,23.286628;113.579054,23.286628;113.579288,23.28635;113.579288,23.28635;113.579479,23.286137;113.579657,23.285898;113.580013,23.285347;113.580013,23.285347;113.58026,23.284996;113.58026,23.284996;113.580768,23.284323;113.580768,23.284323;113.581089,23.283958;113.581089,23.283958;113.581441,23.283611;113.582313,23.282873',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿378省道向东南步行374米直行',\n",
       "      'orientation': '东南',\n",
       "      'road': '378省道',\n",
       "      'distance': '374',\n",
       "      'duration': '299',\n",
       "      'polyline': '113.582313,23.282869;113.582344,23.282756;113.582378,23.282704;113.582656,23.282483;113.582656,23.282483;113.58322,23.282031;113.58322,23.282031;113.583707,23.281641;113.583707,23.281641;113.584201,23.281233;113.584201,23.281233;113.584297,23.281159;113.584297,23.281159;113.584332,23.280968;113.584332,23.280968;113.58464,23.280877;113.58464,23.280877;113.584944,23.280625',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿振兴公路向东南步行331米直行',\n",
       "      'orientation': '东南',\n",
       "      'road': '振兴公路',\n",
       "      'distance': '331',\n",
       "      'duration': '265',\n",
       "      'polyline': '113.584944,23.280621;113.585178,23.280417;113.585178,23.280417;113.585265,23.280343;113.585265,23.280343;113.585365,23.280256;113.585365,23.280256;113.58589,23.2798;113.58589,23.2798;113.587187,23.278668;113.587261,23.278624;113.587339,23.278607',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿九龙大道向南步行638米向左前方行走',\n",
       "      'orientation': '南',\n",
       "      'road': '九龙大道',\n",
       "      'distance': '638',\n",
       "      'duration': '510',\n",
       "      'polyline': '113.587339,23.278602;113.587569,23.278355;113.587873,23.277982;113.588056,23.277726;113.588056,23.277726;113.588359,23.277166;113.588581,23.276706;113.588707,23.276363;113.588811,23.275924;113.588811,23.275924;113.58885,23.27569;113.588902,23.275187;113.588971,23.273563;113.588971,23.273563;113.589002,23.273203',\n",
       "      'action': '向左前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿九龙大道向东南步行18米向右前方行走',\n",
       "      'orientation': '东南',\n",
       "      'road': '九龙大道',\n",
       "      'distance': '18',\n",
       "      'duration': '14',\n",
       "      'polyline': '113.589002,23.273199;113.58911,23.273073',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向南步行646米向左前方行走',\n",
       "      'orientation': '南',\n",
       "      'road': [],\n",
       "      'distance': '646',\n",
       "      'duration': '517',\n",
       "      'polyline': '113.58911,23.273069;113.589171,23.272652;113.589171,23.272652;113.589293,23.271936;113.589236,23.271411;113.589136,23.27102;113.589136,23.27102;113.589084,23.269744;113.589067,23.268099;113.589067,23.268099;113.589054,23.267548;113.589054,23.267548;113.589054,23.267257',\n",
       "      'action': '向左前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向南步行179米向左前方行走',\n",
       "      'orientation': '南',\n",
       "      'road': [],\n",
       "      'distance': '179',\n",
       "      'duration': '143',\n",
       "      'polyline': '113.589049,23.267253;113.589275,23.266992;113.589293,23.266927;113.589301,23.266797;113.589258,23.266571;113.589197,23.266072;113.589136,23.265942;113.589028,23.265751',\n",
       "      'action': '向左前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向南步行1971米右转',\n",
       "      'orientation': '南',\n",
       "      'road': [],\n",
       "      'distance': '1971',\n",
       "      'duration': '1577',\n",
       "      'polyline': '113.589023,23.265747;113.589015,23.264891;113.589015,23.264891;113.588984,23.262977;113.58901,23.262617;113.58901,23.262617;113.589019,23.26237;113.589019,23.26237;113.588993,23.261819;113.588945,23.261311;113.588863,23.26066;113.588863,23.26066;113.588702,23.258971;113.588702,23.258971;113.588694,23.258798;113.588694,23.258798;113.588681,23.258082;113.588689,23.257513;113.588772,23.25638;113.58888,23.255556;113.58888,23.255556;113.588958,23.255152;113.588958,23.255152;113.589332,23.253312;113.589553,23.252105;113.589553,23.252105;113.589653,23.251688;113.589857,23.250664;113.589857,23.250664;113.590187,23.248997;113.590187,23.248997;113.590291,23.248451;113.590291,23.248451;113.59036,23.248134;113.59036,23.248064',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向西步行565米右转',\n",
       "      'orientation': '西',\n",
       "      'road': [],\n",
       "      'distance': '565',\n",
       "      'duration': '452',\n",
       "      'polyline': '113.59036,23.24806;113.590295,23.248003;113.590226,23.247969;113.589709,23.247808;113.589709,23.247808;113.589518,23.24776;113.589518,23.24776;113.587678,23.247261;113.587678,23.247261;113.587044,23.247088;113.587044,23.247088;113.586259,23.246897;113.586259,23.246897;113.585434,23.246688;113.585061,23.246571',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向西步行45米右转',\n",
       "      'orientation': '西',\n",
       "      'road': [],\n",
       "      'distance': '45',\n",
       "      'duration': '36',\n",
       "      'polyline': '113.585056,23.246567;113.584926,23.246641;113.584648,23.246714',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向西北步行224米向右前方行走',\n",
       "      'orientation': '西北',\n",
       "      'road': [],\n",
       "      'distance': '224',\n",
       "      'duration': '179',\n",
       "      'polyline': '113.584644,23.246714;113.584605,23.246814;113.584527,23.24694;113.584375,23.247261;113.584375,23.247261;113.58424,23.247578;113.584206,23.247674;113.584193,23.247691;113.58352,23.2477;113.583446,23.24773;113.583329,23.247834;113.583216,23.247869',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向西北步行126米到达目的地',\n",
       "      'orientation': '西北',\n",
       "      'road': [],\n",
       "      'distance': '126',\n",
       "      'duration': '101',\n",
       "      'polyline': '113.583212,23.247869;113.583086,23.248034;113.582973,23.248329;113.582925,23.248602;113.582886,23.248633;113.582782,23.248676;113.582695,23.24885',\n",
       "      'action': [],\n",
       "      'assistant_action': '到达目的地',\n",
       "      'walk_type': '0'}]}]}}"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r.json()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 期中测试：计算距离？1、里面的数据是什么格式？str->int 2、是不是要会list循环遍历？3、运算？"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 期中测试2：有多少个情况？每一个情况多少次？有多少个空？请转换换成字典作为结果？"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['101',\n",
       " '199',\n",
       " '159',\n",
       " '237',\n",
       " '498',\n",
       " '722',\n",
       " '412',\n",
       " '1381',\n",
       " '165',\n",
       " '118',\n",
       " '674',\n",
       " '247',\n",
       " '2775',\n",
       " '1838',\n",
       " '2161',\n",
       " '781',\n",
       " '1583',\n",
       " '1626',\n",
       " '14',\n",
       " '1098',\n",
       " '24',\n",
       " '79',\n",
       " '52',\n",
       " '31',\n",
       " '13',\n",
       " '21',\n",
       " '8193',\n",
       " '353',\n",
       " '360',\n",
       " '351',\n",
       " '1164',\n",
       " '747',\n",
       " '3133',\n",
       " '1214',\n",
       " '1201',\n",
       " '464',\n",
       " '45',\n",
       " '34',\n",
       " '416',\n",
       " '31',\n",
       " '281',\n",
       " '140',\n",
       " '987',\n",
       " '177',\n",
       " '2131',\n",
       " '1878',\n",
       " '28',\n",
       " '34',\n",
       " '2089',\n",
       " '17',\n",
       " '5618',\n",
       " '33',\n",
       " '41',\n",
       " '383',\n",
       " '27',\n",
       " '5',\n",
       " '28',\n",
       " '4',\n",
       " '29',\n",
       " '275',\n",
       " '23',\n",
       " '652',\n",
       " '25',\n",
       " '32',\n",
       " '5256',\n",
       " '374',\n",
       " '331',\n",
       " '638',\n",
       " '18',\n",
       " '646',\n",
       " '179',\n",
       " '1971',\n",
       " '565',\n",
       " '45',\n",
       " '224',\n",
       " '126']"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.json_normalize(r.json()['route']['paths'][0]['steps'])['distance'].to_list()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 公交\n",
    "1. URL:https://restapi.amap.com/v3/direction/transit/integrated?parameters\n",
    "2. request.get()\n",
    "3. key,origin,destination,city"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [],
   "source": [
    "bus_url = \"https://restapi.amap.com/v3/direction/transit/integrated?parameters\"\n",
    "bus_params = {\n",
    "        \"key\":zhang_key,\n",
    "        \"origin\":results_起始点,\n",
    "        \"destination\":results_终点,\n",
    "    }\n",
    "response = requests.get(url=bus_url,params=bus_params)\n",
    "results = response.json()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Response [200]>"
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'ok',\n",
       " 'infocode': '10000',\n",
       " 'count': '1',\n",
       " 'route': {'origin': '113.679287,23.632575',\n",
       "  'destination': '113.583107,23.249321',\n",
       "  'paths': [{'distance': '60025',\n",
       "    'duration': '48020',\n",
       "    'steps': [{'instruction': '向东步行101米右转',\n",
       "      'orientation': '东',\n",
       "      'road': [],\n",
       "      'distance': '101',\n",
       "      'duration': '81',\n",
       "      'polyline': '113.679592,23.632491;113.680586,23.632522',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向南步行199米向右前方行走',\n",
       "      'orientation': '南',\n",
       "      'road': [],\n",
       "      'distance': '199',\n",
       "      'duration': '159',\n",
       "      'polyline': '113.680586,23.632522;113.680638,23.63214;113.680668,23.63174;113.680634,23.631541;113.68059,23.631437;113.68059,23.631437;113.680499,23.631241;113.680408,23.631094;113.680208,23.630842',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向西步行159米左转',\n",
       "      'orientation': '西',\n",
       "      'road': [],\n",
       "      'distance': '159',\n",
       "      'duration': '127',\n",
       "      'polyline': '113.680204,23.630838;113.680035,23.630773;113.680035,23.630773;113.679644,23.630638;113.679644,23.630638;113.679362,23.630521;113.679201,23.630473;113.679201,23.630473;113.679032,23.63043;113.679032,23.63043;113.67888,23.630404;113.67888,23.630404;113.678711,23.630365',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向南步行237米左转',\n",
       "      'orientation': '南',\n",
       "      'road': [],\n",
       "      'distance': '237',\n",
       "      'duration': '190',\n",
       "      'polyline': '113.678711,23.63036;113.678711,23.62934;113.678711,23.62934;113.678711,23.629193;113.678689,23.629084;113.678637,23.629023;113.678424,23.628902;113.678368,23.628841;113.678316,23.628724;113.678294,23.628611;113.678294,23.628611;113.678277,23.628372',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向南步行498米向右前方行走',\n",
       "      'orientation': '南',\n",
       "      'road': [],\n",
       "      'distance': '498',\n",
       "      'duration': '398',\n",
       "      'polyline': '113.678273,23.628368;113.678572,23.628338;113.678685,23.628307;113.678685,23.628307;113.678845,23.628234;113.679045,23.628073;113.679158,23.627964;113.679158,23.627964;113.679214,23.627869;113.679236,23.627778;113.67928,23.627526;113.679288,23.627322;113.679288,23.627322;113.679253,23.626853;113.679184,23.626623;113.679141,23.626497;113.679002,23.626259;113.678941,23.626176;113.678711,23.625977;113.67862,23.625864;113.678529,23.62572;113.678438,23.625191;113.678429,23.625056;113.678451,23.624939;113.678572,23.624657',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向西南步行722米左转',\n",
       "      'orientation': '西南',\n",
       "      'road': [],\n",
       "      'distance': '722',\n",
       "      'duration': '578',\n",
       "      'polyline': '113.678572,23.624653;113.678559,23.62451;113.678416,23.624323;113.678416,23.624323;113.677582,23.623793;113.676532,23.623346;113.676363,23.623255;113.676272,23.623151;113.676111,23.622834;113.676042,23.622739;113.67579,23.622483;113.675499,23.622279;113.675417,23.622174;113.675386,23.622088;113.675378,23.621836;113.675378,23.621836;113.675391,23.62161;113.675434,23.621476;113.675543,23.621359;113.675764,23.621181;113.675846,23.621089;113.675903,23.620994;113.675907,23.620855;113.675877,23.620725;113.675747,23.620547;113.675599,23.620373;113.675243,23.620013',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向东南步行412米向右前方行走',\n",
       "      'orientation': '东南',\n",
       "      'road': [],\n",
       "      'distance': '412',\n",
       "      'duration': '330',\n",
       "      'polyline': '113.675239,23.620009;113.67549,23.620013;113.675642,23.619991;113.675773,23.619948;113.676016,23.619796;113.676901,23.619193;113.677261,23.618785;113.678069,23.61783;113.678069,23.61783;113.678181,23.617656',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿乌土街向南步行1381米右转',\n",
       "      'orientation': '南',\n",
       "      'road': '乌土街',\n",
       "      'distance': '1381',\n",
       "      'duration': '1105',\n",
       "      'polyline': '113.678181,23.617652;113.678095,23.617205;113.678051,23.617075;113.677973,23.616923;113.677743,23.616558;113.677609,23.616289;113.677391,23.615816;113.677339,23.615668;113.67714,23.614826;113.677049,23.614323;113.676927,23.613359;113.676845,23.612786;113.676602,23.611489;113.676415,23.610438;113.676411,23.610265;113.676411,23.610265;113.676489,23.609848;113.676502,23.609622;113.676493,23.609236;113.676415,23.608746;113.676415,23.608485;113.67648,23.60819;113.67661,23.607734;113.676819,23.606736;113.676862,23.606541;113.676914,23.606415;113.677014,23.606254;113.677535,23.605673',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿乌土街向西南步行165米直行',\n",
       "      'orientation': '西南',\n",
       "      'road': '乌土街',\n",
       "      'distance': '165',\n",
       "      'duration': '132',\n",
       "      'polyline': '113.677535,23.605668;113.676988,23.605373;113.676402,23.605;113.676163,23.604887',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿934县道向西步行118米直行',\n",
       "      'orientation': '西',\n",
       "      'road': '934县道',\n",
       "      'distance': '118',\n",
       "      'duration': '94',\n",
       "      'polyline': '113.676159,23.604883;113.675799,23.604805;113.675508,23.604779;113.675508,23.604779;113.675013,23.60474',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿桃园东路向西南步行674米向右前方行走',\n",
       "      'orientation': '西南',\n",
       "      'road': '桃园东路',\n",
       "      'distance': '674',\n",
       "      'duration': '539',\n",
       "      'polyline': '113.675009,23.604735;113.674236,23.604683;113.673893,23.604618;113.673464,23.604492;113.673464,23.604492;113.67168,23.604006;113.671541,23.603958;113.671411,23.603854;113.671068,23.603472;113.670807,23.603264;113.670807,23.603264;113.670525,23.603073;113.6702,23.602904;113.6702,23.602904;113.670022,23.602795;113.670022,23.602795;113.669909,23.602682;113.669818,23.602517;113.669787,23.602413;113.669718,23.601901',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿桃园东路向西南步行247米直行',\n",
       "      'orientation': '西南',\n",
       "      'road': '桃园东路',\n",
       "      'distance': '247',\n",
       "      'duration': '198',\n",
       "      'polyline': '113.669714,23.601897;113.66964,23.601771;113.66964,23.601771;113.669488,23.601558;113.669488,23.601558;113.668789,23.600859;113.668663,23.600768;113.668663,23.600768;113.668442,23.600647;113.667947,23.600417',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿桃园西路向西南步行2775米向右前方行走',\n",
       "      'orientation': '西南',\n",
       "      'road': '桃园西路',\n",
       "      'distance': '2775',\n",
       "      'duration': '2220',\n",
       "      'polyline': '113.667943,23.600412;113.667331,23.600139;113.667331,23.600139;113.666224,23.599644;113.665955,23.599505;113.665955,23.599505;113.665781,23.599362;113.665781,23.599362;113.665521,23.599093;113.665521,23.599093;113.665286,23.598824;113.665286,23.598824;113.665256,23.598785;113.665256,23.598785;113.664796,23.598238;113.664796,23.598238;113.664401,23.597622;113.664401,23.597622;113.664071,23.59714;113.663746,23.59678;113.663746,23.59678;113.663477,23.59651;113.663477,23.59651;113.66224,23.595434;113.66224,23.595434;113.661563,23.594848;113.661563,23.594848;113.661311,23.594605;113.66115,23.594414;113.660907,23.594032;113.660907,23.594032;113.660829,23.593889;113.660729,23.593598;113.660547,23.593025;113.660464,23.592804;113.660464,23.592804;113.659931,23.591593;113.659831,23.591393;113.659631,23.59105;113.659631,23.59105;113.659115,23.59023;113.658824,23.589592;113.658824,23.589592;113.658754,23.589405;113.658754,23.589405;113.657817,23.58714;113.657747,23.586936;113.657695,23.586693;113.657548,23.585369;113.657548,23.585369;113.657483,23.585161;113.657326,23.584896;113.657326,23.584896;113.657114,23.58457;113.657062,23.584453;113.65691,23.583924;113.656884,23.583785;113.656879,23.583681;113.656888,23.583572;113.656979,23.58326;113.657066,23.58303;113.657157,23.582852;113.657378,23.582539;113.657431,23.582444;113.65747,23.582344;113.657483,23.582235;113.657483,23.582109;113.657435,23.580777;113.657405,23.580616;113.657405,23.580616;113.657296,23.580308;113.657244,23.580221;113.656723,23.579644;113.656723,23.579644;113.656597,23.579488;113.656411,23.579362',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿石海工业大道向西南步行1838米直行',\n",
       "      'orientation': '西南',\n",
       "      'road': '石海工业大道',\n",
       "      'distance': '1838',\n",
       "      'duration': '1470',\n",
       "      'polyline': '113.656406,23.579358;113.656055,23.57931;113.656055,23.57931;113.655091,23.579089;113.654918,23.579023;113.654566,23.57885;113.654566,23.57885;113.653681,23.578372;113.653681,23.578372;113.653429,23.578247;113.653429,23.578247;113.652713,23.577865;113.652713,23.577865;113.652452,23.577704;113.652001,23.577387;113.652001,23.577387;113.651654,23.577105;113.651654,23.577105;113.651437,23.57694;113.651437,23.57694;113.650681,23.576332;113.650681,23.576332;113.650378,23.576094;113.650378,23.576094;113.649674,23.575534;113.649674,23.575534;113.649583,23.575451;113.649583,23.575451;113.64924,23.575182;113.64924,23.575182;113.647409,23.573754;113.647409,23.573754;113.647279,23.573641;113.646793,23.573155;113.646793,23.573155;113.64661,23.57296;113.64661,23.57296;113.646419,23.572778;113.646419,23.572778;113.646202,23.572565;113.645968,23.57237;113.645252,23.571866;113.645252,23.571866;113.644974,23.571732;113.644974,23.571732;113.644883,23.571706;113.644618,23.571671;113.643967,23.571675;113.643967,23.571675;113.643511,23.57168;113.643511,23.57168;113.64329,23.57168;113.643047,23.571654;113.64293,23.571632;113.642548,23.571502;113.642326,23.571411;113.641979,23.571228;113.641636,23.571003;113.641636,23.571003;113.641437,23.57082',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿政通路向西南步行2161米直行',\n",
       "      'orientation': '西南',\n",
       "      'road': '政通路',\n",
       "      'distance': '2161',\n",
       "      'duration': '1729',\n",
       "      'polyline': '113.641432,23.570816;113.641168,23.570525;113.641168,23.570525;113.640964,23.570265;113.640864,23.570156;113.640864,23.570156;113.640651,23.569978;113.640408,23.569822;113.638902,23.569006;113.638902,23.569006;113.638398,23.568746;113.638056,23.568611;113.637695,23.568529;113.637431,23.568507;113.637209,23.568516;113.637209,23.568516;113.636836,23.568576;113.636836,23.568576;113.636484,23.568676;113.636484,23.568676;113.635334,23.569058;113.633754,23.569614;113.633485,23.569674;113.633251,23.569692;113.633251,23.569692;113.633069,23.569688;113.633069,23.569688;113.632778,23.569635;113.632378,23.569492;113.631992,23.569319;113.631853,23.569223;113.631801,23.569158;113.631701,23.568997;113.631441,23.568338;113.631441,23.568338;113.63128,23.567947;113.63128,23.567947;113.63122,23.567834;113.631089,23.567656;113.630946,23.567526;113.630768,23.567387;113.630768,23.567387;113.630456,23.567157;113.630456,23.567157;113.630113,23.566884;113.630113,23.566884;113.629596,23.566458;113.629063,23.565799;113.628359,23.565174;113.62826,23.565026;113.62806,23.564592;113.627665,23.56395;113.627574,23.563815;113.627413,23.56365;113.626576,23.563003;113.626254,23.562804;113.625964,23.562682;113.624987,23.562365',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿灌村路向西步行781米左转',\n",
       "      'orientation': '西',\n",
       "      'road': '灌村路',\n",
       "      'distance': '781',\n",
       "      'duration': '625',\n",
       "      'polyline': '113.624983,23.562361;113.624431,23.562183;113.62349,23.56191;113.623216,23.561771;113.623003,23.561593;113.622661,23.561185;113.622049,23.560525;113.621936,23.560421;113.621775,23.560317;113.621515,23.560226;113.620226,23.559926;113.619579,23.559761;113.619427,23.559744;113.619427,23.559744;113.619188,23.559731;113.619188,23.559731;113.618555,23.559796;113.618355,23.559839;113.618251,23.559887',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿环市东路向西南步行1583米',\n",
       "      'orientation': '西南',\n",
       "      'road': '环市东路',\n",
       "      'distance': '1583',\n",
       "      'duration': '1266',\n",
       "      'polyline': '113.618247,23.559887;113.617626,23.559271;113.617626,23.559271;113.615794,23.557474;113.615794,23.557474;113.615213,23.556905;113.615213,23.556905;113.614093,23.55579;113.614093,23.55579;113.613832,23.55549;113.613832,23.55549;113.613628,23.555217;113.613628,23.555217;113.613429,23.554926;113.613429,23.554926;113.613138,23.554418;113.612778,23.553516;113.612778,23.553516;113.612756,23.553442;113.612756,23.553442;113.612682,23.553251;113.612682,23.553251;113.612656,23.553181;113.612656,23.553181;113.612344,23.552339;113.612344,23.552339;113.612192,23.551949;113.612192,23.551949;113.61207,23.551658;113.611888,23.551354;113.611606,23.550968;113.611476,23.550812;113.611246,23.550577;113.610551,23.55;113.610551,23.55;113.610065,23.549609;113.610065,23.549609;113.609514,23.549162;113.609514,23.549162;113.609071,23.548746;113.609071,23.548746;113.608971,23.548641',\n",
       "      'action': [],\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿环市东路向南步行1626米右转',\n",
       "      'orientation': '南',\n",
       "      'road': '环市东路',\n",
       "      'distance': '1626',\n",
       "      'duration': '1301',\n",
       "      'polyline': '113.608967,23.548637;113.608707,23.548247;113.608537,23.547921;113.608537,23.547921;113.608416,23.547526;113.608364,23.547266;113.608364,23.547266;113.608333,23.54697;113.608333,23.54697;113.608264,23.546155;113.608264,23.546155;113.608225,23.545664;113.608216,23.545061;113.608273,23.544501;113.608333,23.54418;113.608333,23.54418;113.608359,23.544054;113.608359,23.544054;113.60849,23.54342;113.60849,23.54342;113.608533,23.543199;113.608533,23.543199;113.608906,23.541484;113.608906,23.541484;113.609097,23.540564;113.609097,23.540564;113.609297,23.539661;113.609297,23.539661;113.609497,23.538685;113.609557,23.538307;113.609557,23.538307;113.609601,23.537635;113.609601,23.537635;113.609601,23.537166;113.609553,23.536536;113.609553,23.536536;113.609453,23.535916;113.60928,23.535252;113.608872,23.534223',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿从樟一路向西步行14米左转',\n",
       "      'orientation': '西',\n",
       "      'road': '从樟一路',\n",
       "      'distance': '14',\n",
       "      'duration': '11',\n",
       "      'polyline': '113.608867,23.534219;113.608737,23.534223',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿环市东路向西南步行1098米向右前方行走',\n",
       "      'orientation': '西南',\n",
       "      'road': '环市东路',\n",
       "      'distance': '1098',\n",
       "      'duration': '878',\n",
       "      'polyline': '113.608733,23.534223;113.608242,23.53299;113.608242,23.53299;113.608012,23.532448;113.608012,23.532448;113.607799,23.531914;113.607799,23.531914;113.607682,23.531628;113.607682,23.531628;113.607248,23.530551;113.607248,23.530551;113.606988,23.529931;113.606988,23.529931;113.606866,23.529688;113.606866,23.529688;113.606645,23.529345;113.606484,23.529145;113.606484,23.529145;113.606385,23.529032;113.606385,23.529032;113.606128,23.52878;113.605898,23.528581;113.605898,23.528581;113.604952,23.527786;113.604952,23.527786;113.604388,23.527331;113.604388,23.527331;113.603563,23.526636;113.603563,23.526636;113.60329,23.526636;113.60329,23.526636;113.603199,23.526636;113.603199,23.526636;113.603194,23.526641;113.603207,23.526484;113.603207,23.526484;113.603216,23.526311;113.603216,23.526311;113.603142,23.526233',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '步行24米左转',\n",
       "      'orientation': [],\n",
       "      'road': [],\n",
       "      'distance': '24',\n",
       "      'duration': '19',\n",
       "      'polyline': '113.603138,23.526228;113.602908,23.526289',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '1'},\n",
       "     {'instruction': '沿环市东路步行79米向右前方行走',\n",
       "      'orientation': [],\n",
       "      'road': '环市东路',\n",
       "      'distance': '79',\n",
       "      'duration': '63',\n",
       "      'polyline': '113.602904,23.526289;113.602886,23.526141;113.602769,23.525777;113.602769,23.525777;113.602656,23.525621',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿从城大道步行52米左转',\n",
       "      'orientation': [],\n",
       "      'road': '从城大道',\n",
       "      'distance': '52',\n",
       "      'duration': '42',\n",
       "      'polyline': '113.602652,23.525616;113.602448,23.52549;113.602244,23.525399;113.602244,23.525399;113.602205,23.525391',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '步行31米向左前方行走',\n",
       "      'orientation': [],\n",
       "      'road': [],\n",
       "      'distance': '31',\n",
       "      'duration': '25',\n",
       "      'polyline': '113.602201,23.525386;113.60227,23.525109',\n",
       "      'action': '向左前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '1'},\n",
       "     {'instruction': '沿从城大道向东南步行13米右转',\n",
       "      'orientation': '东南',\n",
       "      'road': '从城大道',\n",
       "      'distance': '13',\n",
       "      'duration': '10',\n",
       "      'polyline': '113.60227,23.525104;113.602378,23.525039',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿环市东路向西南步行21米直行',\n",
       "      'orientation': '西南',\n",
       "      'road': '环市东路',\n",
       "      'distance': '21',\n",
       "      'duration': '17',\n",
       "      'polyline': '113.602378,23.525035;113.602257,23.524878',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿广从公路向西南步行8193米直行',\n",
       "      'orientation': '西南',\n",
       "      'road': '广从公路',\n",
       "      'distance': '8193',\n",
       "      'duration': '6554',\n",
       "      'polyline': '113.602253,23.524874;113.601923,23.524431;113.601923,23.524431;113.601589,23.523976;113.601437,23.523806;113.601437,23.523806;113.601289,23.523633;113.601289,23.523633;113.601068,23.523433;113.601068,23.523433;113.600755,23.523212;113.600634,23.523142;113.600373,23.523016;113.600373,23.523016;113.600091,23.522921;113.599648,23.522826;113.599648,23.522826;113.599123,23.522773;113.599123,23.522773;113.598711,23.522739;113.598711,23.522739;113.5974,23.52263;113.5974,23.52263;113.596467,23.522561;113.596467,23.522561;113.595842,23.522513;113.595842,23.522513;113.595486,23.522487;113.595486,23.522487;113.595195,23.522465;113.595195,23.522465;113.594965,23.522444;113.594965,23.522444;113.594523,23.522413;113.594523,23.522413;113.593707,23.522348;113.593707,23.522348;113.59293,23.522287;113.59293,23.522287;113.591884,23.522196;113.591884,23.522196;113.591793,23.522192;113.591793,23.522192;113.591684,23.522179;113.591684,23.522179;113.591454,23.522166;113.591454,23.522166;113.590907,23.522105;113.590356,23.522023;113.590356,23.522023;113.589878,23.521914;113.58931,23.521732;113.58931,23.521732;113.589175,23.521688;113.588572,23.521437;113.587986,23.521128;113.587604,23.520903;113.587205,23.520625;113.586536,23.520095;113.586536,23.520095;113.585755,23.519453;113.585755,23.519453;113.584766,23.518637;113.584766,23.518637;113.584536,23.518446;113.584536,23.518446;113.583047,23.517231;113.583047,23.517231;113.582088,23.516432;113.582088,23.516432;113.581766,23.516168;113.581766,23.516168;113.581315,23.515794;113.581315,23.515794;113.580499,23.515126;113.580499,23.515126;113.579957,23.514709;113.579957,23.514709;113.579683,23.51454;113.579683,23.51454;113.579158,23.514258;113.578607,23.514028;113.578607,23.514028;113.577057,23.513485;113.577057,23.513485;113.576762,23.513377;113.576762,23.513377;113.576076,23.513138;113.576076,23.513138;113.575703,23.513003;113.575104,23.512765;113.574488,23.512491;113.574488,23.512491;113.574023,23.512261;113.574023,23.512261;113.573307,23.511862;113.572643,23.511445;113.572174,23.51112;113.571701,23.510738;113.571055,23.510178;113.571055,23.510178;113.570885,23.510017;113.570421,23.509484;113.570095,23.508967;113.570095,23.508967;113.569696,23.508307;113.569696,23.508307;113.569566,23.508095;113.569566,23.508095;113.569444,23.507895;113.569444,23.507895;113.569141,23.507396;113.569141,23.507396;113.56885,23.506931;113.56885,23.506931;113.568598,23.506523;113.568598,23.506523;113.568394,23.506181;113.568394,23.506181;113.567964,23.505495;113.567964,23.505495;113.567639,23.50503;113.567639,23.50503;113.567439,23.5048;113.567209,23.504575;113.567209,23.504575;113.566966,23.504353;113.566966,23.504353;113.566714,23.504158;113.566506,23.50401;113.566042,23.50375;113.566042,23.50375;113.565516,23.503516;113.564492,23.503125;113.564492,23.503125;113.562405,23.502322;113.562405,23.502322;113.560747,23.501693;113.560747,23.501693;113.560082,23.501441;113.560082,23.501441;113.559457,23.501207;113.559457,23.501207;113.559145,23.501085;113.559145,23.501085;113.558277,23.500725;113.558277,23.500725;113.557865,23.500556;113.557865,23.500556;113.557305,23.500299;113.556897,23.500048;113.556519,23.499792;113.55556,23.498984;113.55556,23.498984;113.555291,23.498776;113.555291,23.498776;113.554965,23.498529;113.554965,23.498529;113.554514,23.498234;113.554514,23.498234;113.554193,23.498047;113.554193,23.498047;113.553811,23.49783;113.553811,23.49783;113.552912,23.497357;113.552912,23.497357;113.550434,23.496016;113.550434,23.496016;113.549457,23.495477;113.549457,23.495477;113.548867,23.495161;113.548867,23.495161;113.548715,23.495074;113.548715,23.495074;113.547535,23.494431;113.546953,23.494062;113.546602,23.493819;113.546137,23.493459;113.546137,23.493459;113.546059,23.493407;113.546059,23.493407;113.545755,23.493225;113.545755,23.493225;113.545734,23.493207;113.545734,23.493207;113.545082,23.492834;113.545082,23.492834;113.544796,23.492661;113.544444,23.492418;113.544444,23.492418;113.543802,23.492005;113.543802,23.492005;113.542956,23.491419;113.542148,23.490924;113.541706,23.490725;113.541345,23.490599;113.541345,23.490599;113.541293,23.490586;113.541293,23.490586;113.540451,23.490382;113.540451,23.490382;113.536523,23.489384;113.536523,23.489384;113.536141,23.489293;113.536141,23.489293;113.535516,23.489141;113.535516,23.489141;113.535313,23.489084;113.535313,23.489084;113.535052,23.489015;113.534679,23.488885',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿广从北路向西南步行353米',\n",
       "      'orientation': '西南',\n",
       "      'road': '广从北路',\n",
       "      'distance': '353',\n",
       "      'duration': '282',\n",
       "      'polyline': '113.534674,23.48888;113.534054,23.488672;113.533715,23.488524;113.533715,23.488524;113.533212,23.488294;113.533212,23.488294;113.5327,23.487977;113.5327,23.487977;113.531719,23.487266',\n",
       "      'action': [],\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿广从北路辅路向西南步行360米直行',\n",
       "      'orientation': '西南',\n",
       "      'road': '广从北路辅路',\n",
       "      'distance': '360',\n",
       "      'duration': '288',\n",
       "      'polyline': '113.531714,23.487261;113.531649,23.487092;113.531146,23.486519;113.531146,23.486519;113.531037,23.486393;113.531037,23.486393;113.530373,23.485595;113.530373,23.485595;113.529857,23.484926;113.529857,23.484926;113.529674,23.484701;113.529674,23.484701;113.529614,23.484618',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿广从南路辅路向西南步行351米直行',\n",
       "      'orientation': '西南',\n",
       "      'road': '广从南路辅路',\n",
       "      'distance': '351',\n",
       "      'duration': '281',\n",
       "      'polyline': '113.529609,23.484614;113.529353,23.484288;113.529353,23.484288;113.528668,23.483407;113.528668,23.483407;113.528194,23.482778;113.528194,23.482778;113.527834,23.482339;113.527834,23.482339;113.527752,23.482227;113.527513,23.482105',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿广从南路向西南步行1164米向左前方行走',\n",
       "      'orientation': '西南',\n",
       "      'road': '广从南路',\n",
       "      'distance': '1164',\n",
       "      'duration': '931',\n",
       "      'polyline': '113.527509,23.482101;113.526997,23.481445;113.526997,23.481445;113.526354,23.480629;113.526354,23.480629;113.52599,23.480182;113.52599,23.480182;113.525972,23.480161;113.525972,23.480161;113.525104,23.479015;113.524887,23.478772;113.52454,23.478446;113.52434,23.47829;113.52434,23.47829;113.524149,23.478155;113.524149,23.478155;113.524041,23.47809;113.522578,23.477283;113.522578,23.477283;113.521866,23.476879;113.52128,23.476567;113.52128,23.476567;113.520707,23.476254;113.520707,23.476254;113.520464,23.476128;113.520464,23.476128;113.5199,23.475842;113.5199,23.475842;113.519839,23.475812;113.519839,23.475812;113.519648,23.475729;113.519175,23.47559;113.519175,23.47559;113.518924,23.475512',\n",
       "      'action': '向左前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿广从南路辅路向西步行747米直行',\n",
       "      'orientation': '西',\n",
       "      'road': '广从南路辅路',\n",
       "      'distance': '747',\n",
       "      'duration': '598',\n",
       "      'polyline': '113.518919,23.475508;113.518754,23.475352;113.518051,23.475117;113.518051,23.475117;113.517435,23.474913;113.517435,23.474913;113.51661,23.474653;113.51661,23.474653;113.515846,23.474423;113.515846,23.474423;113.515673,23.474375;113.515673,23.474375;113.515543,23.474336;113.515543,23.474336;113.51546,23.47431;113.51546,23.47431;113.515161,23.474219;113.515161,23.474219;113.513889,23.473824;113.513889,23.473824;113.513707,23.473772;113.513707,23.473772;113.512292,23.473338;113.512005,23.473351',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿广从南路向西南步行3133米向左前方行走',\n",
       "      'orientation': '西南',\n",
       "      'road': '广从南路',\n",
       "      'distance': '3133',\n",
       "      'duration': '2506',\n",
       "      'polyline': '113.512001,23.473351;113.511576,23.473225;113.511576,23.473225;113.511363,23.473155;113.511363,23.473155;113.510942,23.473025;113.510942,23.473025;113.509922,23.472704;113.508637,23.472205;113.507973,23.471888;113.506871,23.471319;113.506871,23.471319;113.505334,23.470521;113.505334,23.470521;113.504909,23.470295;113.504909,23.470295;113.503589,23.469618;113.503589,23.469618;113.502817,23.46921;113.502817,23.46921;113.501901,23.468737;113.501901,23.468737;113.501506,23.468533;113.501506,23.468533;113.501102,23.468307;113.501102,23.468307;113.500864,23.468168;113.500864,23.468168;113.500651,23.468021;113.500208,23.467665;113.500208,23.467665;113.499813,23.467257;113.499635,23.46704;113.499635,23.46704;113.499362,23.466641;113.499184,23.466298;113.499184,23.466298;113.498668,23.465213;113.498668,23.465213;113.498576,23.465013;113.498576,23.465013;113.498529,23.464918;113.498529,23.464918;113.497088,23.461871;113.497088,23.461871;113.496814,23.461319;113.496602,23.460929;113.496424,23.46066;113.49625,23.460434;113.49625,23.460434;113.496133,23.460282;113.496133,23.460282;113.495339,23.459327;113.495339,23.459327;113.494991,23.458906;113.494991,23.458906;113.494479,23.458294;113.494479,23.458294;113.494089,23.457812;113.493806,23.457439;113.493806,23.457439;113.493516,23.456984;113.493516,23.456984;113.493264,23.456515;113.493264,23.456515;113.492921,23.455781;113.4927,23.455161;113.492565,23.454674;113.492313,23.453507',\n",
       "      'action': '向左前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿广从南路辅路向南步行1214米直行',\n",
       "      'orientation': '南',\n",
       "      'road': '广从南路辅路',\n",
       "      'distance': '1214',\n",
       "      'duration': '971',\n",
       "      'polyline': '113.492309,23.453503;113.492374,23.453355;113.492335,23.453073;113.492335,23.453073;113.492227,23.452461;113.492227,23.452461;113.492096,23.451879;113.492096,23.451879;113.491962,23.45125;113.491962,23.45125;113.491762,23.450508;113.491762,23.450508;113.491402,23.44885;113.491402,23.44885;113.491259,23.448164;113.491259,23.448164;113.49115,23.447674;113.49115,23.447674;113.491029,23.447122;113.491029,23.447122;113.490877,23.446437;113.490877,23.446437;113.490864,23.446345;113.490864,23.446345;113.490786,23.446016;113.490786,23.446016;113.490582,23.445143;113.490582,23.445143;113.490521,23.444887;113.490521,23.444887;113.490313,23.444006;113.490313,23.444006;113.490269,23.443819;113.490269,23.443819;113.490048,23.44303;113.490048,23.44303;113.490009,23.442873;113.489918,23.442756',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿广从南路向西南步行1201米直行',\n",
       "      'orientation': '西南',\n",
       "      'road': '广从南路',\n",
       "      'distance': '1201',\n",
       "      'duration': '961',\n",
       "      'polyline': '113.489913,23.442752;113.489826,23.442435;113.489826,23.442435;113.489809,23.442383;113.489809,23.442383;113.489648,23.441662;113.489648,23.441662;113.489579,23.441341;113.489579,23.441341;113.489336,23.440278;113.489336,23.440278;113.489214,23.439835;113.489145,23.43964;113.489145,23.43964;113.488924,23.43908;113.488793,23.438824;113.488598,23.438477;113.488247,23.437973;113.488247,23.437973;113.487843,23.437483;113.487843,23.437483;113.487595,23.437205;113.487595,23.437205;113.486888,23.436541;113.486888,23.436541;113.486758,23.436415;113.486758,23.436415;113.486285,23.435972;113.486285,23.435972;113.485803,23.435508;113.485803,23.435508;113.485582,23.435295;113.485582,23.435295;113.485469,23.435182;113.485469,23.435182;113.484544,23.434327;113.484544,23.434327;113.484089,23.433919;113.484089,23.433919;113.483872,23.433737',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿广从南路辅路向西南步行464米向左前方行走',\n",
       "      'orientation': '西南',\n",
       "      'road': '广从南路辅路',\n",
       "      'distance': '464',\n",
       "      'duration': '371',\n",
       "      'polyline': '113.483867,23.433733;113.483811,23.433641;113.483689,23.433529;113.483689,23.433529;113.483516,23.433364;113.483516,23.433364;113.483433,23.433286;113.483433,23.433286;113.483364,23.433225;113.483364,23.433225;113.482943,23.432839;113.482943,23.432839;113.482895,23.432804;113.482895,23.432804;113.482652,23.432578;113.482652,23.432578;113.482461,23.432431;113.482461,23.432431;113.482361,23.432348;113.482361,23.432348;113.481845,23.431927;113.481845,23.431927;113.481706,23.431801;113.481463,23.431615;113.481463,23.431615;113.481332,23.43151;113.480777,23.430903;113.480777,23.430903;113.480638,23.430729',\n",
       "      'action': '向左前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿广从南路辅路步行45米向右后方行走',\n",
       "      'orientation': [],\n",
       "      'road': '广从南路辅路',\n",
       "      'distance': '45',\n",
       "      'duration': '36',\n",
       "      'polyline': '113.480634,23.430725;113.480642,23.430503;113.480642,23.430503;113.480694,23.430391;113.480734,23.430343',\n",
       "      'action': '向右后方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿太平东路向西步行34米左转',\n",
       "      'orientation': '西',\n",
       "      'road': '太平东路',\n",
       "      'distance': '34',\n",
       "      'duration': '27',\n",
       "      'polyline': '113.480734,23.430339;113.480417,23.43043',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿广从南路辅路向西南步行416米直行',\n",
       "      'orientation': '西南',\n",
       "      'road': '广从南路辅路',\n",
       "      'distance': '416',\n",
       "      'duration': '333',\n",
       "      'polyline': '113.480412,23.43043;113.480356,23.430343;113.480356,23.430343;113.480165,23.43003;113.480165,23.43003;113.479588,23.429028;113.479588,23.429028;113.47928,23.428503;113.47928,23.428503;113.478715,23.427526;113.478372,23.42717',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿广从南路向南步行31米',\n",
       "      'orientation': '南',\n",
       "      'road': '广从南路',\n",
       "      'distance': '31',\n",
       "      'duration': '25',\n",
       "      'polyline': '113.478368,23.427166;113.478303,23.426997;113.47826,23.42691',\n",
       "      'action': [],\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿广从南路向西南步行281米向左前方行走',\n",
       "      'orientation': '西南',\n",
       "      'road': '广从南路',\n",
       "      'distance': '281',\n",
       "      'duration': '225',\n",
       "      'polyline': '113.478255,23.426905;113.477817,23.426185;113.477817,23.426185;113.477587,23.425794;113.477587,23.425794;113.477444,23.42553;113.477266,23.425165;113.476962,23.424657',\n",
       "      'action': '向左前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向南步行140米左转',\n",
       "      'orientation': '南',\n",
       "      'road': [],\n",
       "      'distance': '140',\n",
       "      'duration': '112',\n",
       "      'polyline': '113.476957,23.424653;113.476693,23.423772;113.476571,23.423437',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿登塘矮岭西路向南步行987米直行',\n",
       "      'orientation': '南',\n",
       "      'road': '登塘矮岭西路',\n",
       "      'distance': '987',\n",
       "      'duration': '790',\n",
       "      'polyline': '113.476567,23.423433;113.477079,23.423108;113.477161,23.423021;113.47724,23.42293;113.477882,23.421801;113.477973,23.42158;113.477973,23.42158;113.478077,23.420938;113.478077,23.420816;113.478077,23.420816;113.478077,23.420061;113.478134,23.419779;113.478147,23.41964;113.478147,23.419527;113.478121,23.419384;113.477808,23.418138;113.477778,23.417969;113.477769,23.417865;113.477812,23.417391;113.477934,23.41661;113.477934,23.41661;113.478056,23.415773;113.478056,23.415773;113.478134,23.415326;113.478199,23.415043',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿083乡道向南步行177米左转',\n",
       "      'orientation': '南',\n",
       "      'road': '083乡道',\n",
       "      'distance': '177',\n",
       "      'duration': '142',\n",
       "      'polyline': '113.478199,23.415039;113.478286,23.414661;113.478437,23.414115;113.478437,23.414115;113.478459,23.413993;113.478468,23.413859;113.478424,23.413468',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿九佛西路向东南步行2131米直行',\n",
       "      'orientation': '东南',\n",
       "      'road': '九佛西路',\n",
       "      'distance': '2131',\n",
       "      'duration': '1705',\n",
       "      'polyline': '113.47842,23.413464;113.478477,23.413446;113.478477,23.413446;113.479596,23.41303;113.479596,23.41303;113.480651,23.412626;113.481176,23.41237;113.481489,23.412174;113.481749,23.411979;113.481949,23.411801;113.482101,23.411654;113.482101,23.411654;113.482435,23.411246;113.482708,23.410859;113.482708,23.410859;113.482986,23.410456;113.482986,23.410456;113.483976,23.409054;113.483976,23.409054;113.485365,23.407088;113.485365,23.407088;113.485868,23.406389;113.486181,23.405911;113.486181,23.405911;113.486211,23.405864;113.486211,23.405864;113.486359,23.405612;113.486484,23.40533;113.486484,23.40533;113.48661,23.405009;113.486675,23.404748;113.486675,23.404748;113.486732,23.40447;113.486753,23.404106;113.486753,23.404106;113.486753,23.403772;113.486753,23.403772;113.48671,23.403385;113.48671,23.403385;113.486675,23.403194;113.486675,23.403194;113.486597,23.402865;113.486428,23.402292;113.486428,23.402292;113.486293,23.401727;113.486293,23.401727;113.486233,23.401276;113.486224,23.400768;113.486224,23.400768;113.48625,23.400486;113.486302,23.400109;113.486441,23.399583;113.486441,23.399583;113.486645,23.399041;113.486862,23.398655;113.487096,23.398299;113.487096,23.398299;113.48724,23.398108;113.487509,23.397795',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿九龙大道向南步行1878米左转',\n",
       "      'orientation': '南',\n",
       "      'road': '九龙大道',\n",
       "      'distance': '1878',\n",
       "      'duration': '1502',\n",
       "      'polyline': '113.487509,23.397791;113.489119,23.396068;113.489119,23.396068;113.489392,23.395777;113.489392,23.395777;113.489714,23.395399;113.489896,23.395135;113.489896,23.395135;113.490126,23.394761;113.490126,23.394761;113.490247,23.39451;113.490451,23.393963;113.490451,23.393963;113.490538,23.393628;113.490538,23.393628;113.490582,23.393433;113.490582,23.393433;113.490599,23.39329;113.490599,23.39329;113.490638,23.392799;113.490638,23.392799;113.490625,23.392244;113.490551,23.391489;113.490551,23.391489;113.490521,23.391081;113.490503,23.390443;113.490521,23.389996;113.49056,23.389696;113.49056,23.389696;113.490612,23.389392;113.490781,23.388672;113.490781,23.388672;113.490864,23.388364;113.490864,23.388364;113.491194,23.387144;113.491194,23.387144;113.491345,23.386593;113.491345,23.386593;113.491506,23.38599;113.491506,23.38599;113.491576,23.385747;113.491576,23.385747;113.49237,23.382904;113.49237,23.382904;113.492461,23.382548;113.492461,23.382548;113.492635,23.382374;113.492704,23.382344;113.492704,23.382344;113.492556,23.382244;113.492556,23.382244;113.492604,23.382057',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '步行28米右转',\n",
       "      'orientation': [],\n",
       "      'road': [],\n",
       "      'distance': '28',\n",
       "      'duration': '22',\n",
       "      'polyline': '113.492604,23.382053;113.492865,23.381949',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '1'},\n",
       "     {'instruction': '步行34米向左前方行走',\n",
       "      'orientation': [],\n",
       "      'road': [],\n",
       "      'distance': '34',\n",
       "      'duration': '27',\n",
       "      'polyline': '113.492865,23.381944;113.49283,23.381866;113.49283,23.381866;113.492756,23.381649',\n",
       "      'action': '向左前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿九龙大道向东南步行2089米右转',\n",
       "      'orientation': '东南',\n",
       "      'road': '九龙大道',\n",
       "      'distance': '2089',\n",
       "      'duration': '1671',\n",
       "      'polyline': '113.492752,23.381645;113.492786,23.381558;113.492786,23.381558;113.492973,23.381102;113.492973,23.381102;113.493225,23.380551;113.493507,23.380035;113.493733,23.379644;113.493733,23.379644;113.494505,23.378342;113.494505,23.378342;113.494748,23.377925;113.494748,23.377925;113.494948,23.377587;113.494948,23.377587;113.494978,23.377539;113.494978,23.377539;113.495213,23.377131;113.495213,23.377131;113.495556,23.376558;113.495556,23.376558;113.495625,23.376445;113.495625,23.376445;113.496228,23.375551;113.496228,23.375551;113.496458,23.375239;113.496701,23.374948;113.496701,23.374948;113.49678,23.374861;113.49678,23.374861;113.497135,23.374479;113.497322,23.374232;113.497756,23.373581;113.49803,23.373251;113.49803,23.373251;113.498242,23.372982;113.49855,23.372708;113.499783,23.371706;113.499783,23.371706;113.499991,23.371532;113.499991,23.371532;113.500286,23.371263;113.500286,23.371263;113.500629,23.370998;113.501667,23.370082;113.501667,23.370082;113.50247,23.369345;113.503498,23.368338;113.503498,23.368338;113.503646,23.368199;113.503646,23.368199;113.504501,23.367374;113.504501,23.367374;113.505126,23.366766',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '步行17米左转',\n",
       "      'orientation': [],\n",
       "      'road': [],\n",
       "      'distance': '17',\n",
       "      'duration': '14',\n",
       "      'polyline': '113.505126,23.366762;113.505009,23.366649',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '1'},\n",
       "     {'instruction': '沿九龙大道向东南步行5618米向右前方行走',\n",
       "      'orientation': '东南',\n",
       "      'road': '九龙大道',\n",
       "      'distance': '5618',\n",
       "      'duration': '4494',\n",
       "      'polyline': '113.505004,23.366645;113.50533,23.366337;113.50533,23.366337;113.505972,23.365668;113.506536,23.365017;113.506536,23.365017;113.506615,23.364922;113.506615,23.364922;113.507895,23.363559;113.507895,23.363559;113.507986,23.363459;113.507986,23.363459;113.50865,23.362813;113.50865,23.362813;113.508945,23.362578;113.508945,23.362578;113.509466,23.36217;113.509466,23.36217;113.510017,23.36174;113.510213,23.361545;113.510391,23.361398;113.510916,23.360985;113.511762,23.360239;113.511762,23.360239;113.512266,23.359753;113.512266,23.359753;113.512305,23.359714;113.512305,23.359714;113.512847,23.359188;113.512847,23.359188;113.513342,23.358707;113.513694,23.358398;113.513694,23.358398;113.514492,23.357747;113.514492,23.357747;113.514648,23.357635;113.514648,23.357635;113.51579,23.356793;113.516189,23.35648;113.516189,23.35648;113.516797,23.355998;113.517309,23.355573;113.517309,23.355573;113.517491,23.355404;113.517491,23.355404;113.517561,23.355343;113.517561,23.355343;113.517964,23.354978;113.517964,23.354978;113.518299,23.354661;113.518299,23.354661;113.518898,23.354089;113.518898,23.354089;113.519978,23.353025;113.519978,23.353025;113.520048,23.35296;113.520048,23.35296;113.520126,23.352886;113.520126,23.352886;113.520421,23.35263;113.520421,23.35263;113.520764,23.352348;113.520764,23.352348;113.521337,23.351931;113.521337,23.351931;113.521597,23.351766;113.521597,23.351766;113.521953,23.351523;113.521953,23.351523;113.522214,23.351345;113.522214,23.351345;113.522526,23.351137;113.522526,23.351137;113.522747,23.350994;113.522747,23.350994;113.52309,23.350755;113.52309,23.350755;113.523602,23.350399;113.523602,23.350399;113.523633,23.350373;113.523633,23.350373;113.524097,23.350091;113.524097,23.350091;113.524158,23.350052;113.524158,23.350052;113.52477,23.34964;113.52477,23.34964;113.525291,23.349275;113.525291,23.349275;113.525456,23.349158;113.525456,23.349158;113.526419,23.348472;113.526419,23.348472;113.527183,23.347912;113.527183,23.347912;113.527214,23.347895;113.527214,23.347895;113.528385,23.347018;113.528385,23.347018;113.528533,23.346901;113.528533,23.346901;113.529197,23.346393;113.529197,23.346393;113.52947,23.346194;113.52947,23.346194;113.529957,23.345825;113.530399,23.345451;113.530399,23.345451;113.530859,23.345022;113.530859,23.345022;113.531059,23.344818;113.531059,23.344818;113.531918,23.343941;113.531918,23.343941;113.53207,23.343789;113.53207,23.343789;113.533194,23.342656;113.533194,23.342656;113.533537,23.342335;113.533963,23.341988;113.533963,23.341988;113.534514,23.341584;113.534887,23.341328;113.534887,23.341328;113.535169,23.34115;113.535169,23.34115;113.535773,23.34079;113.53651,23.340434;113.53701,23.340221;113.53701,23.340221;113.537526,23.340004;113.537526,23.340004;113.538116,23.339757;113.538533,23.339523;113.538984,23.339232;113.538984,23.339232;113.539397,23.338915;113.539783,23.338581;113.540039,23.338316;113.540252,23.338073;113.540252,23.338073;113.540577,23.337643;113.540738,23.3374;113.541016,23.336914;113.541016,23.336914;113.541328,23.336237;113.541523,23.335703;113.541523,23.335703;113.541671,23.335326;113.541671,23.335326;113.542517,23.333103;113.542517,23.333103;113.542973,23.332222;113.542973,23.332222;113.543051,23.33207;113.543051,23.33207;113.543151,23.331914;113.543151,23.331914;113.54322,23.33181;113.54322,23.33181;113.543433,23.331402;113.543433,23.331402;113.543494,23.331259',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '步行33米左转',\n",
       "      'orientation': [],\n",
       "      'road': [],\n",
       "      'distance': '33',\n",
       "      'duration': '26',\n",
       "      'polyline': '113.543494,23.331254;113.54342,23.330968',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '1'},\n",
       "     {'instruction': '沿九龙大道步行41米向右前方行走',\n",
       "      'orientation': [],\n",
       "      'road': '九龙大道',\n",
       "      'distance': '41',\n",
       "      'duration': '33',\n",
       "      'polyline': '113.543416,23.330968;113.543503,23.330955;113.543555,23.330929;113.543767,23.33079',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿九龙大道向东南步行383米向右前方行走',\n",
       "      'orientation': '东南',\n",
       "      'road': '九龙大道',\n",
       "      'distance': '383',\n",
       "      'duration': '306',\n",
       "      'polyline': '113.543767,23.330786;113.543798,23.330738;113.543798,23.330738;113.543837,23.330677;113.543837,23.330677;113.543958,23.330469;113.543958,23.330469;113.544631,23.329319;113.544631,23.329319;113.544735,23.329128;113.544735,23.329128;113.545087,23.32852;113.545087,23.32852;113.545295,23.32819;113.545599,23.327743',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿凤湖中路向南步行27米向左前方行走',\n",
       "      'orientation': '南',\n",
       "      'road': '凤湖中路',\n",
       "      'distance': '27',\n",
       "      'duration': '22',\n",
       "      'polyline': '113.545599,23.327739;113.545612,23.32763;113.545612,23.327496',\n",
       "      'action': '向左前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '步行5米直行',\n",
       "      'orientation': [],\n",
       "      'road': [],\n",
       "      'distance': '5',\n",
       "      'duration': '4',\n",
       "      'polyline': '113.545612,23.327491;113.545642,23.327452',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '1'},\n",
       "     {'instruction': '步行28米向左前方行走',\n",
       "      'orientation': [],\n",
       "      'road': [],\n",
       "      'distance': '28',\n",
       "      'duration': '22',\n",
       "      'polyline': '113.545642,23.327448;113.545799,23.327244',\n",
       "      'action': '向左前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '步行4米向左前方行走',\n",
       "      'orientation': [],\n",
       "      'road': [],\n",
       "      'distance': '4',\n",
       "      'duration': '3',\n",
       "      'polyline': '113.545799,23.32724;113.54582,23.327214',\n",
       "      'action': '向左前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '1'},\n",
       "     {'instruction': '沿凤湖中路向东步行29米向右前方行走',\n",
       "      'orientation': '东',\n",
       "      'road': '凤湖中路',\n",
       "      'distance': '29',\n",
       "      'duration': '23',\n",
       "      'polyline': '113.54582,23.327209;113.545972,23.327192;113.546094,23.327153',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿九龙大道向东南步行275米向右前方行走',\n",
       "      'orientation': '东南',\n",
       "      'road': '九龙大道',\n",
       "      'distance': '275',\n",
       "      'duration': '220',\n",
       "      'polyline': '113.546094,23.327148;113.546406,23.32684;113.546775,23.326532;113.547088,23.326293;113.547561,23.32599;113.547561,23.32599;113.547713,23.325734;113.547713,23.325734;113.547973,23.325755;113.547973,23.325755;113.548134,23.325673',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '步行23米左转',\n",
       "      'orientation': [],\n",
       "      'road': [],\n",
       "      'distance': '23',\n",
       "      'duration': '18',\n",
       "      'polyline': '113.548134,23.325668;113.548194,23.325469',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '1'},\n",
       "     {'instruction': '沿九龙大道步行652米向右前方行走',\n",
       "      'orientation': [],\n",
       "      'road': '九龙大道',\n",
       "      'distance': '652',\n",
       "      'duration': '522',\n",
       "      'polyline': '113.548194,23.325464;113.548329,23.325477;113.548568,23.325451;113.548568,23.325451;113.548811,23.325339;113.548811,23.325339;113.549284,23.325091;113.549709,23.324848;113.54987,23.324735;113.550148,23.32447;113.55056,23.324049;113.55056,23.324049;113.550582,23.324023;113.550582,23.324023;113.551471,23.323112;113.551471,23.323112;113.55171,23.322865;113.55171,23.322865;113.55197,23.322604;113.55197,23.322604;113.551984,23.322587;113.551984,23.322587;113.552405,23.322161;113.552405,23.322161;113.552426,23.322105;113.552556,23.321931;113.552565,23.321827;113.552565,23.321827;113.552739,23.321827;113.552739,23.321827;113.552856,23.321714',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '步行25米左转',\n",
       "      'orientation': [],\n",
       "      'road': [],\n",
       "      'distance': '25',\n",
       "      'duration': '20',\n",
       "      'polyline': '113.552856,23.32171;113.55283,23.32148',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '1'},\n",
       "     {'instruction': '沿九龙大道步行32米向右前方行走',\n",
       "      'orientation': [],\n",
       "      'road': '九龙大道',\n",
       "      'distance': '32',\n",
       "      'duration': '26',\n",
       "      'polyline': '113.552826,23.321476;113.553008,23.321454;113.553138,23.321415',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿九龙大道向东南步行5256米向右前方行走',\n",
       "      'orientation': '东南',\n",
       "      'road': '九龙大道',\n",
       "      'distance': '5256',\n",
       "      'duration': '4205',\n",
       "      'polyline': '113.553138,23.321411;113.553572,23.320933;113.554054,23.320469;113.556133,23.318628;113.556523,23.318247;113.556523,23.318247;113.556645,23.318121;113.556645,23.318121;113.556753,23.318012;113.556753,23.318012;113.557049,23.317669;113.557387,23.317244;113.557387,23.317244;113.557418,23.317201;113.557418,23.317201;113.557812,23.316602;113.558043,23.316198;113.558212,23.315872;113.558212,23.315872;113.558403,23.315451;113.558655,23.314813;113.55898,23.313815;113.559219,23.313203;113.559462,23.312708;113.559592,23.312465;113.559865,23.312053;113.559865,23.312053;113.559948,23.311936;113.559948,23.311936;113.559987,23.311879;113.559987,23.311879;113.560317,23.31148;113.560317,23.31148;113.560712,23.311063;113.561302,23.310577;113.561927,23.310148;113.562734,23.309644;113.563411,23.309154;113.563411,23.309154;113.563741,23.308893;113.564136,23.308494;113.564453,23.308138;113.564453,23.308138;113.56487,23.307561;113.565069,23.307244;113.565291,23.306849;113.565291,23.306849;113.565551,23.306302;113.565551,23.306302;113.565612,23.306163;113.565612,23.306163;113.56681,23.303338;113.56681,23.303338;113.567044,23.302817;113.567044,23.302817;113.567183,23.302504;113.567183,23.302504;113.567235,23.302378;113.567235,23.302378;113.567487,23.301819;113.567739,23.301319;113.568043,23.300851;113.56839,23.300391;113.56839,23.300391;113.568624,23.300109;113.569136,23.299553;113.569136,23.299553;113.569197,23.299484;113.569197,23.299484;113.569722,23.298915;113.570095,23.298481;113.570095,23.298481;113.570273,23.298264;113.570273,23.298264;113.570456,23.298034;113.570456,23.298034;113.570838,23.297483;113.571194,23.296897;113.571194,23.296897;113.571224,23.296849;113.571224,23.296849;113.571823,23.29579;113.57217,23.295204;113.57217,23.295204;113.572361,23.294922;113.572361,23.294922;113.572478,23.294735;113.572478,23.294735;113.57253,23.294657;113.57253,23.294657;113.572643,23.29451;113.572643,23.29451;113.572943,23.294136;113.572943,23.294136;113.573385,23.293585;113.573385,23.293585;113.574141,23.292704;113.574141,23.292704;113.574262,23.292552;113.574262,23.292552;113.574813,23.291892;113.575569,23.290924;113.575955,23.29046;113.575955,23.29046;113.576072,23.290308;113.576072,23.290308;113.576215,23.290117;113.576215,23.290117;113.576415,23.289883;113.576415,23.289883;113.576888,23.289301;113.576888,23.289301;113.577335,23.28875;113.577335,23.28875;113.577795,23.288181;113.577795,23.288181;113.577995,23.287934;113.577995,23.287934;113.579054,23.286628;113.579054,23.286628;113.579288,23.28635;113.579288,23.28635;113.579479,23.286137;113.579657,23.285898;113.580013,23.285347;113.580013,23.285347;113.58026,23.284996;113.58026,23.284996;113.580768,23.284323;113.580768,23.284323;113.581089,23.283958;113.581089,23.283958;113.581441,23.283611;113.582313,23.282873',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿378省道向东南步行374米直行',\n",
       "      'orientation': '东南',\n",
       "      'road': '378省道',\n",
       "      'distance': '374',\n",
       "      'duration': '299',\n",
       "      'polyline': '113.582313,23.282869;113.582344,23.282756;113.582378,23.282704;113.582656,23.282483;113.582656,23.282483;113.58322,23.282031;113.58322,23.282031;113.583707,23.281641;113.583707,23.281641;113.584201,23.281233;113.584201,23.281233;113.584297,23.281159;113.584297,23.281159;113.584332,23.280968;113.584332,23.280968;113.58464,23.280877;113.58464,23.280877;113.584944,23.280625',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿振兴公路向东南步行331米直行',\n",
       "      'orientation': '东南',\n",
       "      'road': '振兴公路',\n",
       "      'distance': '331',\n",
       "      'duration': '265',\n",
       "      'polyline': '113.584944,23.280621;113.585178,23.280417;113.585178,23.280417;113.585265,23.280343;113.585265,23.280343;113.585365,23.280256;113.585365,23.280256;113.58589,23.2798;113.58589,23.2798;113.587187,23.278668;113.587261,23.278624;113.587339,23.278607',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿九龙大道向南步行638米向左前方行走',\n",
       "      'orientation': '南',\n",
       "      'road': '九龙大道',\n",
       "      'distance': '638',\n",
       "      'duration': '510',\n",
       "      'polyline': '113.587339,23.278602;113.587569,23.278355;113.587873,23.277982;113.588056,23.277726;113.588056,23.277726;113.588359,23.277166;113.588581,23.276706;113.588707,23.276363;113.588811,23.275924;113.588811,23.275924;113.58885,23.27569;113.588902,23.275187;113.588971,23.273563;113.588971,23.273563;113.589002,23.273203',\n",
       "      'action': '向左前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿九龙大道向东南步行18米向右前方行走',\n",
       "      'orientation': '东南',\n",
       "      'road': '九龙大道',\n",
       "      'distance': '18',\n",
       "      'duration': '14',\n",
       "      'polyline': '113.589002,23.273199;113.58911,23.273073',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向南步行646米向左前方行走',\n",
       "      'orientation': '南',\n",
       "      'road': [],\n",
       "      'distance': '646',\n",
       "      'duration': '517',\n",
       "      'polyline': '113.58911,23.273069;113.589171,23.272652;113.589171,23.272652;113.589293,23.271936;113.589236,23.271411;113.589136,23.27102;113.589136,23.27102;113.589084,23.269744;113.589067,23.268099;113.589067,23.268099;113.589054,23.267548;113.589054,23.267548;113.589054,23.267257',\n",
       "      'action': '向左前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向南步行179米向左前方行走',\n",
       "      'orientation': '南',\n",
       "      'road': [],\n",
       "      'distance': '179',\n",
       "      'duration': '143',\n",
       "      'polyline': '113.589049,23.267253;113.589275,23.266992;113.589293,23.266927;113.589301,23.266797;113.589258,23.266571;113.589197,23.266072;113.589136,23.265942;113.589028,23.265751',\n",
       "      'action': '向左前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向南步行1971米右转',\n",
       "      'orientation': '南',\n",
       "      'road': [],\n",
       "      'distance': '1971',\n",
       "      'duration': '1577',\n",
       "      'polyline': '113.589023,23.265747;113.589015,23.264891;113.589015,23.264891;113.588984,23.262977;113.58901,23.262617;113.58901,23.262617;113.589019,23.26237;113.589019,23.26237;113.588993,23.261819;113.588945,23.261311;113.588863,23.26066;113.588863,23.26066;113.588702,23.258971;113.588702,23.258971;113.588694,23.258798;113.588694,23.258798;113.588681,23.258082;113.588689,23.257513;113.588772,23.25638;113.58888,23.255556;113.58888,23.255556;113.588958,23.255152;113.588958,23.255152;113.589332,23.253312;113.589553,23.252105;113.589553,23.252105;113.589653,23.251688;113.589857,23.250664;113.589857,23.250664;113.590187,23.248997;113.590187,23.248997;113.590291,23.248451;113.590291,23.248451;113.59036,23.248134;113.59036,23.248064',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向西步行565米右转',\n",
       "      'orientation': '西',\n",
       "      'road': [],\n",
       "      'distance': '565',\n",
       "      'duration': '452',\n",
       "      'polyline': '113.59036,23.24806;113.590295,23.248003;113.590226,23.247969;113.589709,23.247808;113.589709,23.247808;113.589518,23.24776;113.589518,23.24776;113.587678,23.247261;113.587678,23.247261;113.587044,23.247088;113.587044,23.247088;113.586259,23.246897;113.586259,23.246897;113.585434,23.246688;113.585061,23.246571',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向西步行45米右转',\n",
       "      'orientation': '西',\n",
       "      'road': [],\n",
       "      'distance': '45',\n",
       "      'duration': '36',\n",
       "      'polyline': '113.585056,23.246567;113.584926,23.246641;113.584648,23.246714',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向西北步行224米向右前方行走',\n",
       "      'orientation': '西北',\n",
       "      'road': [],\n",
       "      'distance': '224',\n",
       "      'duration': '179',\n",
       "      'polyline': '113.584644,23.246714;113.584605,23.246814;113.584527,23.24694;113.584375,23.247261;113.584375,23.247261;113.58424,23.247578;113.584206,23.247674;113.584193,23.247691;113.58352,23.2477;113.583446,23.24773;113.583329,23.247834;113.583216,23.247869',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向西北步行126米到达目的地',\n",
       "      'orientation': '西北',\n",
       "      'road': [],\n",
       "      'distance': '126',\n",
       "      'duration': '101',\n",
       "      'polyline': '113.583212,23.247869;113.583086,23.248034;113.582973,23.248329;113.582925,23.248602;113.582886,23.248633;113.582782,23.248676;113.582695,23.24885',\n",
       "      'action': [],\n",
       "      'assistant_action': '到达目的地',\n",
       "      'walk_type': '0'}]}]}}"
      ]
     },
     "execution_count": 33,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r.json()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 搜索POI\n",
    "1. 适用场景\n",
    "2. 周边搜索\n",
    "3. 多边形搜索\n",
    "4. ID查询"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 关键字搜索\n",
    "1. 通过用POI的关键字进行条件搜索，例如：肯德基、朝阳公园等；同时支持设置POI类型搜索，例如：银行"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [],
   "source": [
    "def text(keywords,types,city=None,extensions='base',sig=None):\n",
    "    url=\"https://restapi.amap.com/v3/place/text?parameters\"\n",
    "    params={\n",
    "        \"key\":zhang_key,\n",
    "        \"keywords\":keywords,\n",
    "        \"types\":types,\n",
    "        \"city\":city,\n",
    "        \"extensions\":extensions,\n",
    "        \"sig\":sig,\n",
    "    }\n",
    "    r=requests.get(url,params=params)\n",
    "    results=r.json()\n",
    "    return results"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'suggestion': {'keywords': [], 'cities': []},\n",
       " 'count': '26',\n",
       " 'infocode': '10000',\n",
       " 'pois': [{'parent': [],\n",
       "   'address': '文龙街10号蓝宝石城2层A11',\n",
       "   'distance': [],\n",
       "   'biz_ext': [],\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '佛山市',\n",
       "   'type': '餐饮服务;快餐厅;必胜客',\n",
       "   'photos': [],\n",
       "   'typecode': '050303',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '禅城区',\n",
       "   'name': '必胜客(新东方广场餐厅)',\n",
       "   'location': '113.120147,23.038022',\n",
       "   'tel': '0757-82283626;4009701890;0757-82321010',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFGXGXH7'},\n",
       "  {'parent': 'B02F5076UA',\n",
       "   'address': '季华五路33号顺联国际购物中心首层,二层',\n",
       "   'distance': [],\n",
       "   'biz_ext': [],\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '佛山市',\n",
       "   'type': '餐饮服务;快餐厅;必胜客',\n",
       "   'photos': [],\n",
       "   'typecode': '050303',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '201',\n",
       "   'adname': '禅城区',\n",
       "   'name': '必胜客(季华店)',\n",
       "   'location': '113.114048,23.012531',\n",
       "   'tel': '0757-82283226;4009701890;0757-82363111',\n",
       "   'shopid': [],\n",
       "   'id': 'B02F506SCU'},\n",
       "  {'parent': 'B0FFI1Z4A7',\n",
       "   'address': '季华五路36号印象城一层,二层',\n",
       "   'distance': [],\n",
       "   'biz_ext': [],\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '佛山市',\n",
       "   'type': '餐饮服务;快餐厅;必胜客',\n",
       "   'photos': [],\n",
       "   'typecode': '050303',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '202',\n",
       "   'adname': '禅城区',\n",
       "   'name': '必胜客(新一城餐厅)',\n",
       "   'location': '113.122509,23.011145',\n",
       "   'tel': '0757-83808377;4009701890;0757-82808377',\n",
       "   'shopid': [],\n",
       "   'id': 'B02F50W4V7'},\n",
       "  {'parent': 'B02F507KOX',\n",
       "   'address': '桂城海三路叠南圣堂618号鸿大商业广场首层',\n",
       "   'distance': [],\n",
       "   'biz_ext': [],\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '佛山市',\n",
       "   'type': '餐饮服务;快餐厅;必胜客',\n",
       "   'photos': [],\n",
       "   'typecode': '050303',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '201',\n",
       "   'adname': '南海区',\n",
       "   'name': '必胜客(鸿大广场店)',\n",
       "   'location': '113.134695,23.048329',\n",
       "   'tel': '0757-81631141;4009701890;0757-81631140',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFF0FJIR'},\n",
       "  {'parent': 'B02F50UVYV',\n",
       "   'address': '桂城桂平西路2号顺联国际奥特莱斯1层',\n",
       "   'distance': [],\n",
       "   'biz_ext': [],\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '佛山市',\n",
       "   'type': '餐饮服务;快餐厅;必胜客',\n",
       "   'photos': [],\n",
       "   'typecode': '050303',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '201',\n",
       "   'adname': '南海区',\n",
       "   'name': '必胜客(南海桂城餐厅)',\n",
       "   'location': '113.156305,23.032656',\n",
       "   'tel': '0757-86324880;4009701890',\n",
       "   'shopid': [],\n",
       "   'id': 'B02F50W4HP'},\n",
       "  {'parent': [],\n",
       "   'address': '季华四路33号佛山创意产业园2号楼1层',\n",
       "   'distance': [],\n",
       "   'biz_ext': [],\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '佛山市',\n",
       "   'type': '餐饮服务;快餐厅;必胜客',\n",
       "   'photos': [],\n",
       "   'typecode': '050303',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '禅城区',\n",
       "   'name': '必胜客(季华四路店)',\n",
       "   'location': '113.098739,23.012092',\n",
       "   'tel': '0757-66634568;4009701890',\n",
       "   'shopid': [],\n",
       "   'id': 'B02F50YCVZ'},\n",
       "  {'parent': [],\n",
       "   'address': '桂城镇桂澜路45号鹏瑞利广场1层',\n",
       "   'distance': [],\n",
       "   'biz_ext': [],\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '佛山市',\n",
       "   'type': '餐饮服务;快餐厅;必胜客',\n",
       "   'photos': [],\n",
       "   'typecode': '050303',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '南海区',\n",
       "   'name': '必胜客(季华七路餐厅)',\n",
       "   'location': '113.151928,23.011867',\n",
       "   'tel': '0757-81631064;4009701890',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFF3YC2W'},\n",
       "  {'parent': [],\n",
       "   'address': '南一路与海三路交叉口南150米',\n",
       "   'distance': [],\n",
       "   'biz_ext': [],\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '佛山市',\n",
       "   'type': '餐饮服务;快餐厅;必胜客',\n",
       "   'photos': [],\n",
       "   'typecode': '050303',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '南海区',\n",
       "   'name': '必胜客(欢乐餐厅)',\n",
       "   'location': '113.134210,23.049594',\n",
       "   'tel': '0757-81631140;0757-81631141',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFMDF69V'},\n",
       "  {'parent': 'B0FFF2NRDD',\n",
       "   'address': '桂城街道石龙南路6号怡丰城首层,二层',\n",
       "   'distance': [],\n",
       "   'biz_ext': [],\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '佛山市',\n",
       "   'type': '餐饮服务;快餐厅;必胜客',\n",
       "   'photos': [],\n",
       "   'typecode': '050303',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '201',\n",
       "   'adname': '南海区',\n",
       "   'name': '必胜客(怡丰城店)',\n",
       "   'location': '113.187477,23.033605',\n",
       "   'tel': '0757-81279601;4009208809',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFG7SM9N'},\n",
       "  {'parent': 'B02F50WF3O',\n",
       "   'address': '桂城街道桂澜北路28号广场首层-二层',\n",
       "   'distance': [],\n",
       "   'biz_ext': [],\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '佛山市',\n",
       "   'type': '餐饮服务;快餐厅;必胜客',\n",
       "   'photos': [],\n",
       "   'typecode': '050303',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '202',\n",
       "   'adname': '南海区',\n",
       "   'name': '必胜客(南海万达店)',\n",
       "   'location': '113.158703,23.063093',\n",
       "   'tel': '0757-81637175;4009701890;0757-81637176',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFFEW5V2'},\n",
       "  {'parent': [],\n",
       "   'address': '罗村街道府前路以南金盛广场一层商铺、二层商铺',\n",
       "   'distance': [],\n",
       "   'biz_ext': [],\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '佛山市',\n",
       "   'type': '餐饮服务;快餐厅;必胜客',\n",
       "   'photos': [],\n",
       "   'typecode': '050303',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '南海区',\n",
       "   'name': '必胜客(罗村店)',\n",
       "   'location': '113.052150,23.057554',\n",
       "   'tel': '0757-66868660;4008823823',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFGZU41T'},\n",
       "  {'parent': [],\n",
       "   'address': '乐从镇乐从大道东路B270号星光广场1-2层',\n",
       "   'distance': [],\n",
       "   'biz_ext': [],\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '佛山市',\n",
       "   'type': '餐饮服务;快餐厅;必胜客',\n",
       "   'photos': [],\n",
       "   'typecode': '050303',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '顺德区',\n",
       "   'name': '必胜客(乐从店)',\n",
       "   'location': '113.107187,22.947861',\n",
       "   'tel': '0757-28978441;4009701890',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFFEOV65'},\n",
       "  {'parent': 'B02F507H9Y',\n",
       "   'address': '广佛一路98号嘉洲广场首二层',\n",
       "   'distance': [],\n",
       "   'biz_ext': [],\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '佛山市',\n",
       "   'type': '餐饮服务;快餐厅;必胜客',\n",
       "   'photos': [],\n",
       "   'typecode': '050303',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '202',\n",
       "   'adname': '南海区',\n",
       "   'name': '必胜客(嘉洲广场餐厅)',\n",
       "   'location': '113.188224,23.108178',\n",
       "   'tel': '0757-85964828;4009208809;0757-85964838',\n",
       "   'shopid': [],\n",
       "   'id': 'B02F506TLD'},\n",
       "  {'parent': [],\n",
       "   'address': '北滘镇君兰居委会林上北路诚德路1号美的财富广场首层1015、1017号',\n",
       "   'distance': [],\n",
       "   'biz_ext': [],\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '佛山市',\n",
       "   'type': '餐饮服务;快餐厅;必胜客',\n",
       "   'photos': [],\n",
       "   'typecode': '050303',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '顺德区',\n",
       "   'name': '必胜客(美的置业广场店)',\n",
       "   'location': '113.216184,22.932382',\n",
       "   'tel': '0757-23273007;4009701890',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFMEMFDO'},\n",
       "  {'parent': 'B02F503ILX',\n",
       "   'address': '南庄镇南庄二马路89号吉利购物广场1层',\n",
       "   'distance': [],\n",
       "   'biz_ext': [],\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '佛山市',\n",
       "   'type': '餐饮服务;快餐厅;必胜客',\n",
       "   'photos': [],\n",
       "   'typecode': '050303',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '201',\n",
       "   'adname': '禅城区',\n",
       "   'name': '必胜客(南庄吉利餐厅)',\n",
       "   'location': '113.016011,22.969669',\n",
       "   'tel': '0757-82566885;4009208809;0757-82566886',\n",
       "   'shopid': [],\n",
       "   'id': 'B02F50W4UI'},\n",
       "  {'parent': 'B02F506SWH',\n",
       "   'address': '陈村镇陈村佛陈路1号顺联广场1号楼一层-二层',\n",
       "   'distance': [],\n",
       "   'biz_ext': [],\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '佛山市',\n",
       "   'type': '餐饮服务;快餐厅;必胜客',\n",
       "   'photos': [],\n",
       "   'typecode': '050303',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '201',\n",
       "   'adname': '顺德区',\n",
       "   'name': '必胜客(顺联广场店)',\n",
       "   'location': '113.241227,22.952108',\n",
       "   'tel': '0757-23307378;4009208809;0757-23307278',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFGCQTBY'},\n",
       "  {'parent': 'B0FFF0KPN3',\n",
       "   'address': '狮山镇博爱中路61号和信广场首层-二层',\n",
       "   'distance': [],\n",
       "   'biz_ext': [],\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '佛山市',\n",
       "   'type': '餐饮服务;快餐厅;必胜客',\n",
       "   'photos': [],\n",
       "   'typecode': '050303',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '201',\n",
       "   'adname': '南海区',\n",
       "   'name': '必胜客(佛山博爱店)',\n",
       "   'location': '113.005945,23.120751',\n",
       "   'tel': '0757-81166532;4009208809;0757-81166531',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFFPTGQ0'},\n",
       "  {'parent': [],\n",
       "   'address': '丰华北路77附近',\n",
       "   'distance': [],\n",
       "   'biz_ext': [],\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '佛山市',\n",
       "   'type': '餐饮服务;快餐厅;必胜客',\n",
       "   'photos': [],\n",
       "   'typecode': '050303',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '顺德区',\n",
       "   'name': '必胜客',\n",
       "   'location': '113.077874,22.871354',\n",
       "   'tel': '0757-23393892;4009208809',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFG6NDAN'},\n",
       "  {'parent': [],\n",
       "   'address': '里水镇里水大道北98号星御名都商场首层-二层',\n",
       "   'distance': [],\n",
       "   'biz_ext': [],\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '佛山市',\n",
       "   'type': '餐饮服务;快餐厅;必胜客',\n",
       "   'photos': [],\n",
       "   'typecode': '050303',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '南海区',\n",
       "   'name': '必胜客(里水餐厅)',\n",
       "   'location': '113.156946,23.199234',\n",
       "   'tel': '0757-85687933;4009208809;0757-66676722',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFF65IUH'},\n",
       "  {'parent': [],\n",
       "   'address': '大沥镇黄歧海北建设大道1号金沙湾财富广场首层-二层',\n",
       "   'distance': [],\n",
       "   'biz_ext': [],\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '佛山市',\n",
       "   'type': '餐饮服务;快餐厅;必胜客',\n",
       "   'photos': [],\n",
       "   'typecode': '050303',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '南海区',\n",
       "   'name': '必胜客(海北建设大道店)',\n",
       "   'location': '113.208718,23.141931',\n",
       "   'tel': '0757-85964868;4009208809',\n",
       "   'shopid': [],\n",
       "   'id': 'B02F50WYRT'}],\n",
       " 'status': '1',\n",
       " 'info': 'OK'}"
      ]
     },
     "execution_count": 35,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "results_关键字搜索=text('美食','050303','佛山')\n",
    "results_关键字搜索"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 周边搜索\n",
    "1. url:https://restapi.amap.com/v3/place/around?parameters \n",
    "2. request.get\n",
    "3. location,keywords,types,radius,offset,page,extensions"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [],
   "source": [
    "def around(location,keywords=None,types=None,radius=None,offset=None,page=None,extensions='base'):\n",
    "    url=\"https://restapi.amap.com/v3/place/around?parameters\"\n",
    "    params={\n",
    "        \"key\":zhang_key,\n",
    "        \"location\":location,\n",
    "        \"keywords\":keywords,\n",
    "        \"types\":types,\n",
    "        \"radius\":radius,\n",
    "        \"offset\":offset,\n",
    "        \"page\":page,\n",
    "        \"extensions\":extensions\n",
    "    }\n",
    "    r=requests.get(url,params=params)\n",
    "    results=r.json()\n",
    "    return results"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'suggestion': {'keywords': [], 'cities': []},\n",
       " 'count': '827',\n",
       " 'infocode': '10000',\n",
       " 'pois': [{'parent': [],\n",
       "   'address': '温泉镇笃行路20、22、24号中山大学南方学院',\n",
       "   'distance': '0',\n",
       "   'biz_ext': [],\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'type': '生活服务;共享设备;充电宝',\n",
       "   'photos': [],\n",
       "   'typecode': '072101',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'name': '街电(榴芒一族中山大学南方学院店)',\n",
       "   'location': '113.679287,23.632575',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFLB846S'},\n",
       "  {'parent': [],\n",
       "   'address': '从化温泉镇中山大学南方学院博学路6号',\n",
       "   'distance': '0',\n",
       "   'biz_ext': [],\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'type': '餐饮服务;中餐厅;特色/地方风味餐厅',\n",
       "   'photos': [],\n",
       "   'typecode': '050118',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'name': '爽爽石磨肠粉',\n",
       "   'location': '113.679287,23.632575',\n",
       "   'tel': '18218913303',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFKX3T5Y'},\n",
       "  {'parent': [],\n",
       "   'address': '温泉镇中山大学南方学院明辨路2号二、三层',\n",
       "   'distance': '0',\n",
       "   'biz_ext': [],\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'type': '餐饮服务;餐饮相关场所;餐饮相关',\n",
       "   'photos': [],\n",
       "   'typecode': '050000',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'name': '避风塘',\n",
       "   'location': '113.679286,23.632574',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFKT2R96'},\n",
       "  {'parent': [],\n",
       "   'address': '温泉镇中山大学南方学院明辨路2号二、三层',\n",
       "   'distance': '0',\n",
       "   'biz_ext': [],\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'type': '餐饮服务;餐饮相关场所;餐饮相关',\n",
       "   'photos': [],\n",
       "   'typecode': '050000',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'name': 'slim tea',\n",
       "   'location': '113.679286,23.632574',\n",
       "   'tel': '18944690066',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFKSLFAN'},\n",
       "  {'parent': [],\n",
       "   'address': '温泉镇中山大学南方学院后门润泰超市一楼05号商铺',\n",
       "   'distance': '0',\n",
       "   'biz_ext': [],\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'type': '餐饮服务;中餐厅;特色/地方风味餐厅',\n",
       "   'photos': [],\n",
       "   'typecode': '050118',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'name': '劲酷烤吧',\n",
       "   'location': '113.679286,23.632573',\n",
       "   'tel': '13719231627',\n",
       "   'shopid': [],\n",
       "   'id': 'B0G3AYBO5X'},\n",
       "  {'parent': [],\n",
       "   'address': '温泉镇中山大学南方学院后门润泰超市一楼05号商铺',\n",
       "   'distance': '0',\n",
       "   'biz_ext': [],\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'type': '餐饮服务;中餐厅;广东菜(粤菜)',\n",
       "   'photos': [],\n",
       "   'typecode': '050103',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'name': '东记乡村美食',\n",
       "   'location': '113.679286,23.632573',\n",
       "   'tel': '13922398107',\n",
       "   'shopid': [],\n",
       "   'id': 'B0G3APADKJ'},\n",
       "  {'parent': [],\n",
       "   'address': '温泉镇中山大学南方学院后门润泰超市一楼05号商铺',\n",
       "   'distance': '0',\n",
       "   'biz_ext': [],\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'type': '餐饮服务;快餐厅;快餐厅',\n",
       "   'photos': [],\n",
       "   'typecode': '050300',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'name': '北方饺子馆',\n",
       "   'location': '113.679286,23.632573',\n",
       "   'tel': '13434241448',\n",
       "   'shopid': [],\n",
       "   'id': 'B0G2Z7IX80'},\n",
       "  {'parent': [],\n",
       "   'address': '温泉镇中山大学南方学院后门润泰超市一楼05号商铺',\n",
       "   'distance': '0',\n",
       "   'biz_ext': [],\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'type': '餐饮服务;餐饮相关场所;餐饮相关',\n",
       "   'photos': [],\n",
       "   'typecode': '050000',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'name': '第1烤场',\n",
       "   'location': '113.679286,23.632573',\n",
       "   'tel': '13538825321',\n",
       "   'shopid': [],\n",
       "   'id': 'B0G2K6PX0X'},\n",
       "  {'parent': [],\n",
       "   'address': '温泉镇中山大学南方学院后门润泰超市一楼05号商铺',\n",
       "   'distance': '0',\n",
       "   'biz_ext': [],\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'type': '餐饮服务;餐饮相关场所;餐饮相关',\n",
       "   'photos': [],\n",
       "   'typecode': '050000',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'name': '叶龙老武汉烧烤',\n",
       "   'location': '113.679286,23.632573',\n",
       "   'tel': '15918718710;13125030232',\n",
       "   'shopid': [],\n",
       "   'id': 'B0G1393J7X'},\n",
       "  {'parent': [],\n",
       "   'address': '从化温泉镇中山大学南方学院明辩路2号',\n",
       "   'distance': '0',\n",
       "   'biz_ext': [],\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'type': '餐饮服务;餐饮相关场所;餐饮相关',\n",
       "   'photos': [],\n",
       "   'typecode': '050000',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'name': '网红小串店',\n",
       "   'location': '113.679286,23.632573',\n",
       "   'tel': '13802426981',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFLNRH1K'},\n",
       "  {'parent': [],\n",
       "   'address': '温泉镇中山大学南方学院后门润泰超市一楼05号商铺',\n",
       "   'distance': '0',\n",
       "   'biz_ext': [],\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'type': '餐饮服务;餐饮相关场所;餐饮相关',\n",
       "   'photos': [],\n",
       "   'typecode': '050000',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'name': '过气轻食屋',\n",
       "   'location': '113.679286,23.632573',\n",
       "   'tel': '13049636920',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFKTDMOI'},\n",
       "  {'parent': [],\n",
       "   'address': '温泉镇中山大学南方学院后门润泰超市一楼05号商铺',\n",
       "   'distance': '0',\n",
       "   'biz_ext': [],\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'type': '餐饮服务;餐饮相关场所;餐饮相关',\n",
       "   'photos': [],\n",
       "   'typecode': '050000',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'name': '莫凡烧烤',\n",
       "   'location': '113.679286,23.632573',\n",
       "   'tel': '13929768267',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFKT4WNY'},\n",
       "  {'parent': [],\n",
       "   'address': '温泉大道882号旁润泰超市一楼商铺',\n",
       "   'distance': '0',\n",
       "   'biz_ext': [],\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'type': '餐饮服务;冷饮店;冷饮店',\n",
       "   'photos': [],\n",
       "   'typecode': '050700',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'name': 'LV柠檬茶',\n",
       "   'location': '113.679286,23.632573',\n",
       "   'tel': '15018428578',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFIIQNQ7'},\n",
       "  {'parent': [],\n",
       "   'address': '温泉镇中山大学南方学院后门润泰超市一楼05号商铺',\n",
       "   'distance': '0',\n",
       "   'biz_ext': [],\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'type': '餐饮服务;甜品店;甜品店',\n",
       "   'photos': [],\n",
       "   'typecode': '050900',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'name': '味美轩(中大店)',\n",
       "   'location': '113.679286,23.632571',\n",
       "   'tel': '15915874513',\n",
       "   'shopid': [],\n",
       "   'id': 'B0G2T96S9V'},\n",
       "  {'parent': [],\n",
       "   'address': '中山大学南方学院',\n",
       "   'distance': '0',\n",
       "   'biz_ext': [],\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'type': '餐饮服务;中餐厅;四川菜(川菜)',\n",
       "   'photos': [],\n",
       "   'typecode': '050102',\n",
       "   'shopinfo': '1',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'name': '重庆湖边纸包鱼',\n",
       "   'location': '113.679871,23.630292',\n",
       "   'tel': '13924024938',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFL7NUA2'},\n",
       "  {'parent': [],\n",
       "   'address': '博学路中山大学南方学院后门润泰超市首层23号',\n",
       "   'distance': '1',\n",
       "   'biz_ext': [],\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'type': '餐饮服务;快餐厅;快餐厅',\n",
       "   'photos': [],\n",
       "   'typecode': '050300',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'name': '我家厨房',\n",
       "   'location': '113.679289,23.632563',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFK28XPU'},\n",
       "  {'parent': [],\n",
       "   'address': '温泉大道882号',\n",
       "   'distance': '2',\n",
       "   'biz_ext': [],\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'type': '生活服务;共享设备;充电宝',\n",
       "   'photos': [],\n",
       "   'typecode': '072101',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'name': '怪兽充电(中山大学南方学院)',\n",
       "   'location': '113.679262,23.632583',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFLLU813'},\n",
       "  {'parent': [],\n",
       "   'address': '温泉镇博学路中山大学南方学院后门润泰超市一楼05号商铺',\n",
       "   'distance': '9',\n",
       "   'biz_ext': [],\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'type': '餐饮服务;外国餐厅;日本料理',\n",
       "   'photos': [],\n",
       "   'typecode': '050202',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'name': '井禾寿司',\n",
       "   'location': '113.679193,23.632552',\n",
       "   'tel': '13789117723',\n",
       "   'shopid': [],\n",
       "   'id': 'B0G14PDQVA'},\n",
       "  {'parent': [],\n",
       "   'address': '中山大学南方学院',\n",
       "   'distance': '12',\n",
       "   'biz_ext': [],\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'type': '餐饮服务;外国餐厅;西餐厅(综合风味)',\n",
       "   'photos': [],\n",
       "   'typecode': '050201',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'name': 'Uni-hotel西餐',\n",
       "   'location': '113.679224,23.632671',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0GR3OMDZ2'},\n",
       "  {'parent': [],\n",
       "   'address': '从化温泉镇中山大学南方学院明辩路2号',\n",
       "   'distance': '16',\n",
       "   'biz_ext': [],\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'type': '餐饮服务;中餐厅;广东菜(粤菜)',\n",
       "   'photos': [],\n",
       "   'typecode': '050103',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'name': '耀记美食',\n",
       "   'location': '113.679405,23.632673',\n",
       "   'tel': '18816801934',\n",
       "   'shopid': [],\n",
       "   'id': 'B0GRGOTLSL'}],\n",
       " 'status': '1',\n",
       " 'info': 'OK'}"
      ]
     },
     "execution_count": 37,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "results_周边搜索=around(中大南方_location)\n",
    "results_周边搜索"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 行政区域规划\n",
    "1. 行政区域查询是一类简单的HTTP接口，根据用户输入的搜索条件可以帮助用户快速的查找特定的行政区域信息。\n",
    "2. URL:https://restapi.amap.com/v3/config/district?parameters\n",
    "3. request.get\n",
    "4. keywords,subdistrict,extensions"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [],
   "source": [
    "def district(keywords,subdistrict=None,page=None,extensions=\"base\"):\n",
    "    district_url = \"https://restapi.amap.com/v3/config/district?parameters\"\n",
    "    district_params = {\n",
    "        \"key\":zhang_key,\n",
    "        \"keywords\":keywords,\n",
    "        \"subdistrict\":subdistrict,\n",
    "        \"page\":page,\n",
    "        \"extensions\":extensions,\n",
    "        \"output\":\"json\"\n",
    "    }\n",
    "    response = requests.get(district_url,district_params)\n",
    "    results = response.json()\n",
    "    return results"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'count': '1',\n",
       " 'suggestion': {'keywords': [], 'cities': []},\n",
       " 'districts': [{'citycode': [],\n",
       "   'adcode': '440000',\n",
       "   'name': '广东省',\n",
       "   'center': '113.280637,23.125178',\n",
       "   'level': 'province',\n",
       "   'districts': [{'citycode': '0754',\n",
       "     'adcode': '440500',\n",
       "     'name': '汕头市',\n",
       "     'center': '116.708463,23.37102',\n",
       "     'level': 'city',\n",
       "     'districts': []},\n",
       "    {'citycode': '0757',\n",
       "     'adcode': '440600',\n",
       "     'name': '佛山市',\n",
       "     'center': '113.122717,23.028762',\n",
       "     'level': 'city',\n",
       "     'districts': []},\n",
       "    {'citycode': '0758',\n",
       "     'adcode': '441200',\n",
       "     'name': '肇庆市',\n",
       "     'center': '112.472529,23.051546',\n",
       "     'level': 'city',\n",
       "     'districts': []},\n",
       "    {'citycode': '0752',\n",
       "     'adcode': '441300',\n",
       "     'name': '惠州市',\n",
       "     'center': '114.412599,23.079404',\n",
       "     'level': 'city',\n",
       "     'districts': []},\n",
       "    {'citycode': '0755',\n",
       "     'adcode': '440300',\n",
       "     'name': '深圳市',\n",
       "     'center': '114.085947,22.547',\n",
       "     'level': 'city',\n",
       "     'districts': []},\n",
       "    {'citycode': '0759',\n",
       "     'adcode': '440800',\n",
       "     'name': '湛江市',\n",
       "     'center': '110.364977,21.274898',\n",
       "     'level': 'city',\n",
       "     'districts': []},\n",
       "    {'citycode': '0756',\n",
       "     'adcode': '440400',\n",
       "     'name': '珠海市',\n",
       "     'center': '113.553986,22.224979',\n",
       "     'level': 'city',\n",
       "     'districts': []},\n",
       "    {'citycode': '0768',\n",
       "     'adcode': '445100',\n",
       "     'name': '潮州市',\n",
       "     'center': '116.632301,23.661701',\n",
       "     'level': 'city',\n",
       "     'districts': []},\n",
       "    {'citycode': '0668',\n",
       "     'adcode': '440900',\n",
       "     'name': '茂名市',\n",
       "     'center': '110.919229,21.659751',\n",
       "     'level': 'city',\n",
       "     'districts': []},\n",
       "    {'citycode': '0750',\n",
       "     'adcode': '440700',\n",
       "     'name': '江门市',\n",
       "     'center': '113.094942,22.590431',\n",
       "     'level': 'city',\n",
       "     'districts': []},\n",
       "    {'citycode': '0762',\n",
       "     'adcode': '441600',\n",
       "     'name': '河源市',\n",
       "     'center': '114.697802,23.746266',\n",
       "     'level': 'city',\n",
       "     'districts': []},\n",
       "    {'citycode': '0766',\n",
       "     'adcode': '445300',\n",
       "     'name': '云浮市',\n",
       "     'center': '112.044439,22.929801',\n",
       "     'level': 'city',\n",
       "     'districts': []},\n",
       "    {'citycode': '0660',\n",
       "     'adcode': '441500',\n",
       "     'name': '汕尾市',\n",
       "     'center': '115.364238,22.774485',\n",
       "     'level': 'city',\n",
       "     'districts': []},\n",
       "    {'citycode': '0662',\n",
       "     'adcode': '441700',\n",
       "     'name': '阳江市',\n",
       "     'center': '111.975107,21.859222',\n",
       "     'level': 'city',\n",
       "     'districts': []},\n",
       "    {'citycode': '0663',\n",
       "     'adcode': '445200',\n",
       "     'name': '揭阳市',\n",
       "     'center': '116.355733,23.543778',\n",
       "     'level': 'city',\n",
       "     'districts': []},\n",
       "    {'citycode': '0753',\n",
       "     'adcode': '441400',\n",
       "     'name': '梅州市',\n",
       "     'center': '116.117582,24.299112',\n",
       "     'level': 'city',\n",
       "     'districts': []},\n",
       "    {'citycode': '020',\n",
       "     'adcode': '440100',\n",
       "     'name': '广州市',\n",
       "     'center': '113.280637,23.125178',\n",
       "     'level': 'city',\n",
       "     'districts': []},\n",
       "    {'citycode': '0751',\n",
       "     'adcode': '440200',\n",
       "     'name': '韶关市',\n",
       "     'center': '113.591544,24.801322',\n",
       "     'level': 'city',\n",
       "     'districts': []},\n",
       "    {'citycode': '0763',\n",
       "     'adcode': '441800',\n",
       "     'name': '清远市',\n",
       "     'center': '113.051227,23.685022',\n",
       "     'level': 'city',\n",
       "     'districts': []},\n",
       "    {'citycode': '0760',\n",
       "     'adcode': '442000',\n",
       "     'name': '中山市',\n",
       "     'center': '113.382391,22.521113',\n",
       "     'level': 'city',\n",
       "     'districts': []},\n",
       "    {'citycode': '0769',\n",
       "     'adcode': '441900',\n",
       "     'name': '东莞市',\n",
       "     'center': '113.746262,23.046237',\n",
       "     'level': 'city',\n",
       "     'districts': []}]}]}"
      ]
     },
     "execution_count": 39,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "results_行政查询 = district(\"广东\")\n",
    "results_行政查询"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### IP定位\n",
    "1. IP定位是一个简单的HTTP接口，根据用户输入的IP地址，能够快速的帮用户定位IP的所在位置。\n",
    "2. URL:https://restapi.amap.com/v3/ip?parameters\n",
    "3. request.get\n",
    "4. ip"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 63,
   "metadata": {},
   "outputs": [],
   "source": [
    "def ip(ip,sig=None):\n",
    "    url = \"https://restapi.amap.com/v3/ip?parameters\"\n",
    "    ip_params = {\n",
    "        \"key\":zhang_key,\n",
    "        \"ip\":ip,\n",
    "        \"sig\":sig,\n",
    "        \"output\":'json'\n",
    "    }\n",
    "    response = requests.get(url,params=ip_params)\n",
    "    results = response.json()\n",
    "    return results"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 64,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'province': [],\n",
       " 'city': [],\n",
       " 'adcode': [],\n",
       " 'rectangle': []}"
      ]
     },
     "execution_count": 64,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "results_IP定位=ip('81.71.17.53') \n",
    "results_IP定位"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 静态地图\n",
    "1. 静态地图服务通过返回一张地图图片响应HTTP请求，使用户能够将高德地图以图片形式嵌入自己的网页中。用户可以指定请求的地图位置、图片大小、以及在地图上添加覆盖物，如标签、标注、折线、多边形。\n",
    "2. URL:https://restapi.amap.com/v3/staticmap?parameters\n",
    "3. requests.get\n",
    "4. key,location,zoom"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 60,
   "metadata": {},
   "outputs": [],
   "source": [
    "from PIL import Image\n",
    "from io import BytesIO"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 61,
   "metadata": {},
   "outputs": [],
   "source": [
    "def staticmap(location,zoom,size=None,scale=1,markers=None,labels=None,paths=None,traffic=0,sig=None):\n",
    "    url=\"https://restapi.amap.com/v3/staticmap?parameters\"\n",
    "    params={\n",
    "        \"key\":zhang_key,\n",
    "        \"location\":location,\n",
    "        \"zoom\":zoom,\n",
    "        \"size\":size,\n",
    "        \"scale\":scale,\n",
    "        \"markers\":markers,\n",
    "        \"labels\":labels,\n",
    "        \"paths\":paths,\n",
    "        \"traffic\":traffic,\n",
    "        \"sig\":sig,\n",
    "        \"output\":'json'\n",
    "    }\n",
    "    response = requests.get(url,params=params)\n",
    "    data=Image.open(BytesIO(response.content))\n",
    "    return data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 62,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAABAAAAAQACAMAAABIw9uxAAADAFBMVEX///+Pjorw7ur69Oz5+fLR0c/z5sWenJiurKeSkZE4ODYAiv7y9OmcmpbV1NL59u/+9fQuLi1kY2C1tbPi4d8rKinc29mmpqW5ubfGxcOLi4vm5OH5+PT+/P5HR0UeHR328uvK3u2xsK2l53um6X92dXT49/P889jy8e7+zWYAif6a5Gzj9897e3ssLCtaWVfv8edwgYCLi4peXl39+/cxMS/Pzsz911X08+/n5N6VlJG7uLPKycXX1tTn5uOq5nWgoJ8AV78vZIvAv7tlZGL18/A0NDJTUk+ioJyxxte6ubi213EAhv78xlLy8Oz+14L19PF0c3Cg1nah2m+sq6q21+7x4H69vbyv0fWhoKBXVlU8Ozr39fFoZ2XFxMFmZmU+dqSioqCr54Ds7ePd2tXPzci9u7eXlpXp5t/d4uh0r97p7vTY4Xvu7e5+fn6trazo8NvKychxcG7d1bSPl5EAl/yIh4Uqn/AaGhmBgH4AfPPy7+QAgf60s7FKSUeenZz18/Da2NWsq6hQUFDCwcDz8euXxu76+PSfnpwAkP1zcm+TkpDRz8n8yjqYmJd0uPbz8u+gnppCQkGxr6oAeeLy7NQAbtZ+fXwUFBMAkP6FhYQAkPqOjo27urhsa2rIx8Tn5N6qqql9fHvk6/G44nnt7uZKo+Hc29nu6+VYWFgqKSh4eHjj4Np6eHZgYGAyMjD08u6ayP2ZmZn+4TbU0s6VlJJ2dnUAk/6HhoSmpqX7+PMmJSSbm5qXl5a9splgYF/8+/dVVFP78c/49vOmpKGAgIC+uH3W1dNbW1qJiIhubm3f3NYoJybh4NyxsK+amprU0szT0tAjIiH37txZWFb9/f339OlEQ0EKmPjr7uD7+fT+3DTy9Po9PDvx7uicmpYODg7w7+u/vr1NTErQzsgvLy37+faKiojHxb+3tbGko6ORkI+rqaXx7ueMjIxKSUf5+Pb+zFj8+enz9PmOjo349e6ZmZj6+PP39O37+fWkop1lZGH69/H6+PL69/D7+PHIb/6pAAAAAXRSTlMAQObYZgAAEvNJREFUeJzt3AmsnWWBgGHFAQENGsAExCnoiLKJE0AgyhrIIMgik3FwARGCWMWAMmFTEkoAQUQYlUUwAkWlhbI5iAhTMoJCWJpCQdBA2aEsBSRYKEu5/9zbltFJNDqTG6B5nye5N/9/vpub73zJ955z7n/OfcMbAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgrxmAJZMAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQJgAQNj4BGBknL3WqwIR4xqAOV+55prbvjLqzl++6+kX5gsAvM6NYwAW/OPeH9tppy+vu+W6677176c+ec+mcwQAXt/GMQBv3XLdH6+99pffu/feW44G4Jhnvr7WnQIAr2vjF4Ar9173vX8MwDPPvPuLX39aAOB1bfwCcOfeWy4OwD9s+czt7z73dz+6Y9KCV3b0KwcvL/jjyYI/ufkVAgCvpvELwN+Nvvb/2GgA1t3yxz/+xElf+9q5z0zddHRD37/qrFkrHD1z1qxZZ20xMv/mB2ZtPGu3VTc+65KRKUuPbHHWlV9d+cqRkan7X3vc3KfmPfWBDdYSAHgVjV8A7lxvvfWWWXunXd6/3vaHnH7yyTv+dKOn54wGYMquH5h2zs+nnTNt2v6rvXzA1Ude9s7TJtzwi+kfX23b46c8st30o867aOkrTztzhxsvu/mqJx44agMBgFfR+AXghdtvv/3tm9y1yycPecs6p558+ek/Gj0fDcCdB1x1xUJXzXxh5t1nrXbcEfPOvOq5K36111HbHrjigVddtNLk6+dcO2XjG1e64oDlVl512uIA3PTr99wz+mv3/fUto3N8dPRobK6Lvj2/6Giz5185Gf44Nvr12PK/H7X8Y6/+UsKSZxwDsPP9G12z9laHHL7O5aeeetBbDnnTm+7ZfTQAu//+jMmPj5q8wYSP3z/ljGuPX2XDpS+64urN58+dPv+Ky17Ydak5K86Zu9IDn/3sTzY/7/Nn7b8oAPeufua2Mx5624RPr/nwI8MJxz//wc+848Vh14c/NJqCuS8Nz//m4fXfs+8Zw8KTXW+99dbVHx0bO+bqD62/7/DEwWN36+AnXuN1hSXCOAbgmCc/cdLvdlznoIO2PvWgyw8/6Zl7pk4aDcD83TY48bkxj+x25dQ9523x1FYHX/HIiTcsNXLZViMr3TDnxpXv32POvB2mzPvtaeftufn0pxbu/5sOvWkY9p2w2d3DMPVDw1E/u/fMYeKhH5kwcsLFw933vTR8b7thnxnD3VMXnow6YcLCsbkrDrfMGJ6YMfYMYIYAwN9gHAOwxh1fOnzHyw/6wdj+/8GO33jm/ifHAjDp5v2v+sKo5865efejl//hsV9YbvpTRzzyqUsWzD1iwcyxAEzaY87c3VZabuYqD1w2d/q8RU8ANlw4t32+/8bRVwAT3zFsc8twzKFrfngYzp/47EdfGja7+JZ7JwwXfmcYOxmGZ5ff58KxsTNHv923+aOPnT1q380mvrbrCkuEcQzA7D+8fftDLv/a2P7/5jdPf/dGs/f7w2gAjj5v4xM3mDdvg+dmXb/bywc89++PT545c+bkA3YfmTcagEfm/NfKK28356mjl565wyqr7HXkDtcuDMBhFw4XXHzxxWs8usf5q3/4I9uNTvOWux9ZcfRB/e4ThhdfGqZe/N1bvzW8uMcwdjIM31pzWDj2hYe3Oey+PX7z/U//Zszxr/XKwhJgHANw2yl3LLPT57Y+eXT/X77jIe9//ymn3DEWgKcO+MVuK62027RVJ680Mvmdcx6YPmXqv0z61IKRy/YaOeCpF/Zaea8H7tz/q6tedtwRxx085bOL/gbwnQ8Ow/PPf//z+wzDzw699/pheOPF2wy73jsMD18wtucvPGw4ZvWJy16/KAAjMy5YPPbEth9d/dmJ//nimBNe43WFJcL4BWDY5K5LN/n2dVuffPrpl1++45cuvfTSu/51LACnzd3z8ZtvfnzP6T//4cin5k6atuZyKxwx5bxLJk27YefJ5622xZEb3z/nxrkPnHjEEdNvXuGGRVcBpq4+un/ffN+9V48Mz56/7O+HXz+4xjAs+8HhghkjY3t+10eG51c/+95dFwVgm+8uHvveR4dHJwxTvzNmw2+91gsLS4JxDcBdm2xy3dZ7/vPvdjx9nev+JwDX/mqFr2688eePvPn6pUYe3+vIyVMumrb/kVsdecXV18/7yRkbHn/jRf9x56xPf+CMa6894+ADz9t80VWAx26dsPyDv33y+hkPnn/OGjOG7Q699dZbz37wwfW/t3DP3/Tw1f904bDHexYF4LDThuHZsbGb1l/xHY8uvlvbfuQ1XVVYQoxfAO485ZTbltnkus/92y4PnXv4jt/4xPbbb//usasAuy9+e++k942MvPy++fMX7L7Uzi/Pf3nSpE13H7lyrUs23Xn+yIL3rXXJmJ2PXfze4OH5h24am93Eh6YOw4H7Lp7rPk8uPnh2hYnDs59525/ej7GxY8Z+ehjuufvB7969xqu2grAEG78AvDx7v9m3rb3TLrO/eNs13zj3p6NO+tFf+czPX/S/pjhxxT838Tcv+xfv08SzXQKAv8n4BWBkzj37nTIWgElrrbHR7LEAfHKcPg58z5+b+J+9Efg/GccALJgze5mdvr3L7KWmTr19v7H97x+CwOvcOAZgZOSFkWuuue3pY4991y+f3m+/2f/vx38BgFfJuAZg3LzWqwIR4xMAYIkkABA2Dvv/vwFlzcT9sW2GWgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<PIL.PngImagePlugin.PngImageFile image mode=P size=1024x1024 at 0x19398B6D220>"
      ]
     },
     "execution_count": 62,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_静态地图=staticmap(中大南方_location,[1,17],'1024*1024')\n",
    "data_静态地图"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 坐标转换\n",
    "1. 坐标转换是一类简单的HTTP接口，能够将用户输入的非高德坐标（GPS坐标、mapbar坐标、baidu坐标）转换成高德坐标。\n",
    "2. URL:https://restapi.amap.com/v3/assistant/coordinate/convert?parameters\n",
    "3. request.get\n",
    "4. locations,coordsys"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 249,
   "metadata": {},
   "outputs": [],
   "source": [
    "def convert(locations,coordsys=None,sig=None):\n",
    "    url=\"https://restapi.amap.com/v3/assistant/coordinate/convert?parameters\"\n",
    "    params={\n",
    "        \"key\":zhang_key,\n",
    "        \"locations\":locations,\n",
    "        \"coordsys\":coordsys,\n",
    "        \"sig\":sig,\n",
    "    }\n",
    "    response=requests.get(url,params=params)\n",
    "    results=response.json()\n",
    "    return results"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 250,
   "metadata": {},
   "outputs": [],
   "source": [
    "location_中大南方=113.685752,23.638368"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 251,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1', 'info': 'ok', 'infocode': '10000', 'locations': '113.685752'}"
      ]
     },
     "execution_count": 251,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "results_坐标转换=convert(location_中大南方)\n",
    "results_坐标转换"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 天气查询\n",
    "1. 天气查询是一个简单的HTTP接口，根据用户输入的adcode，查询目标区域当前/未来的天气情况。\n",
    "2. url:https://restapi.amap.com/v3/weather/weatherInfo?parameters\n",
    "3. request.get\n",
    "4. city,key"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 252,
   "metadata": {},
   "outputs": [],
   "source": [
    "def weather(city,extensions=None):\n",
    "    url=\"https://restapi.amap.com/v3/weather/weatherInfo?parameters\"\n",
    "    params={\n",
    "        \"key\":zhang_key,\n",
    "        \"city\":city,\n",
    "        \"extensions\":extensions\n",
    "    }\n",
    "    response=requests.get(url,params=params)\n",
    "    results=response.json()\n",
    "    return results"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 253,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'count': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'lives': [{'province': '广东',\n",
       "   'city': '佛山市',\n",
       "   'adcode': '440600',\n",
       "   'weather': '多云',\n",
       "   'temperature': '22',\n",
       "   'winddirection': '东',\n",
       "   'windpower': '≤3',\n",
       "   'humidity': '85',\n",
       "   'reporttime': '2020-11-16 22:52:19'}]}"
      ]
     },
     "execution_count": 253,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "results_天气查询=weather(440600,'base')\n",
    "results_天气查询"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 输入提示\n",
    "1. 输入提示是一类简单的HTTP接口，提供根据用户输入的关键词查询返回建议列表。\n",
    "2. url:https://restapi.amap.com/v3/assistant/inputtips?parameters\n",
    "3. requests.get\n",
    "4. key,keywords,type,location,city,datatype"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 254,
   "metadata": {},
   "outputs": [],
   "source": [
    "def inputtips(keywords,type=None,location=None,city=None,datatype=all):\n",
    "    url=\"https://restapi.amap.com/v3/assistant/inputtips?parameters\"\n",
    "    params={\n",
    "        \"key\":zhang_key,\n",
    "        \"keywords\":keywords,\n",
    "        \"type\":type,\n",
    "        \"location\":location,\n",
    "        \"city\":city,\n",
    "        \"datatype\":datatype\n",
    "    }\n",
    "    response=requests.get(url,params=params)\n",
    "    results=response.json()\n",
    "    return results"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 255,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'count': '10',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'tips': [{'id': 'B036706ZVC',\n",
       "   'name': '麦当劳(春城得来速店)',\n",
       "   'district': '云南省昆明市官渡区',\n",
       "   'adcode': '530111',\n",
       "   'location': '102.726178,25.018438',\n",
       "   'address': '春城路166-168号上海沙龙首层',\n",
       "   'typecode': '050302',\n",
       "   'city': []},\n",
       "  {'id': 'B001C806EK',\n",
       "   'name': '麦当劳(欢乐谷店)',\n",
       "   'district': '四川省成都市金牛区',\n",
       "   'adcode': '510106',\n",
       "   'location': '104.035489,30.719447',\n",
       "   'address': '沙西线1号华侨城公园广场',\n",
       "   'typecode': '050302',\n",
       "   'city': []},\n",
       "  {'id': 'B001C8059O',\n",
       "   'name': '麦当劳(软件园DT餐厅)',\n",
       "   'district': '四川省成都市武侯区',\n",
       "   'adcode': '510107',\n",
       "   'location': '104.070686,30.542893',\n",
       "   'address': '天府大道中段801号,天府软件园B区',\n",
       "   'typecode': '050302',\n",
       "   'city': []},\n",
       "  {'id': 'B001C80DKS',\n",
       "   'name': '麦当劳(五桂桥餐厅)',\n",
       "   'district': '四川省成都市成华区',\n",
       "   'adcode': '510108',\n",
       "   'location': '104.128358,30.636119',\n",
       "   'address': '迎晖路194号五桂桥客运站内',\n",
       "   'typecode': '050302',\n",
       "   'city': []},\n",
       "  {'id': 'B001C8OFKY',\n",
       "   'name': '麦当劳(成都东站)',\n",
       "   'district': '四川省成都市成华区',\n",
       "   'adcode': '510108',\n",
       "   'location': '104.143451,30.628907',\n",
       "   'address': '青衣江路成都东站候车大厅2层',\n",
       "   'typecode': '050302',\n",
       "   'city': []},\n",
       "  {'id': 'B001786OHS',\n",
       "   'name': '麦当劳(鲁能星城得来速店)',\n",
       "   'district': '重庆市渝北区',\n",
       "   'adcode': '500112',\n",
       "   'location': '106.560443,29.594875',\n",
       "   'address': '渝鲁大道666号鲁能新城7街区1层',\n",
       "   'typecode': '050302',\n",
       "   'city': []},\n",
       "  {'id': 'B001D0YL8Z',\n",
       "   'name': '麦当劳(北客站北店)',\n",
       "   'district': '陕西省西安市未央区',\n",
       "   'adcode': '610112',\n",
       "   'location': '108.938634,34.378386',\n",
       "   'address': '文景路北口西安北站F3层',\n",
       "   'typecode': '050302',\n",
       "   'city': []},\n",
       "  {'id': 'B0FFF657F1',\n",
       "   'name': '麦当劳(金莎国际店)',\n",
       "   'district': '陕西省西安市雁塔区',\n",
       "   'adcode': '610113',\n",
       "   'location': '108.947617,34.225757',\n",
       "   'address': '长安中路65号金莎国际广场一层',\n",
       "   'typecode': '050302',\n",
       "   'city': []},\n",
       "  {'id': 'B0FFFSAWF7',\n",
       "   'name': '麦当劳(南宁站店)',\n",
       "   'district': '广西壮族自治区南宁市兴宁区',\n",
       "   'adcode': '450102',\n",
       "   'location': '108.317946,22.822833',\n",
       "   'address': '朝阳路76号南方大厦1层',\n",
       "   'typecode': '050302',\n",
       "   'city': []},\n",
       "  {'id': 'B02E80N1CR',\n",
       "   'name': '麦当劳(中心汽车站店)',\n",
       "   'district': '湖南省张家界市永定区',\n",
       "   'adcode': '430802',\n",
       "   'location': '110.484279,29.105338',\n",
       "   'address': '官黎坪路张家界中心汽车站',\n",
       "   'typecode': '050302',\n",
       "   'city': []}]}"
      ]
     },
     "execution_count": 255,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "results_输入提示=inputtips('麦当劳','050302',116.481488,39.990464,'北京')\n",
    "results_输入提示"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 交通态势\n",
    "1. 交通态势是一类简单的HTTP接口，提供根据用户输入的内容能够返回希望查询的交通态势情况。\n",
    "* 说明：交通态势接口计划将于2020年12月31日下线，目前不再对新用户开放。如需合作请通过工单进行商务咨询。 *\n",
    "2. url:https://restapi.amap.com/v3/traffic/status/rectangle?parameters\n",
    "3. requests.get\n",
    "4. rectangle,key"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 258,
   "metadata": {},
   "outputs": [],
   "source": [
    "def rectangle(rectangle,level=None,extensions='base'):\n",
    "    url=\"https://restapi.amap.com/v3/traffic/status/rectangle?parameters\"\n",
    "    params={\n",
    "        \"key\":zhang_key,\n",
    "        \"rectangle\":rectangle,\n",
    "        \"level\":level,\n",
    "        \"extensions\":extensions\n",
    "    }\n",
    "    response=requests.get(url,params=params)\n",
    "    results=response.json()\n",
    "    return results"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 277,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'info': 'INSUFFICIENT_PRIVILEGES',\n",
       " 'infocode': '10012',\n",
       " 'status': '0',\n",
       " 'sec_code_debug': 'd41d8cd98f00b204e9800998ecf8427e',\n",
       " 'key': '241cb34c3ba21b934c74a65177c504ec',\n",
       " 'sec_code': 'd41d8cd98f00b204e9800998ecf8427e'}"
      ]
     },
     "execution_count": 277,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "results_交通态势=rectangle(中大南方_location)\n",
    "results_交通态势"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.3"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {
    "height": "calc(100% - 180px)",
    "left": "10px",
    "top": "150px",
    "width": "256px"
   },
   "toc_section_display": true,
   "toc_window_display": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
